Skip to content

Commit fa6343b

Browse files
committed
removed fns.values altogether. using objectValues from js sdk utils directly
1 parent e78b60a commit fa6343b

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

packages/optimizely-sdk/lib/core/notification_center/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
var enums = require('../../utils/enums');
1818
var fns = require('../../utils/fns');
19-
var sprintf = require('@optimizely/js-sdk-utils').sprintf;
19+
var jsSdkUtils = require('@optimizely/js-sdk-utils');
2020

2121
var LOG_LEVEL = enums.LOG_LEVEL;
2222
var LOG_MESSAGES = enums.LOG_MESSAGES;
@@ -55,7 +55,7 @@ function NotificationCenter(options) {
5555
*/
5656
NotificationCenter.prototype.addNotificationListener = function (notificationType, callback) {
5757
try {
58-
var isNotificationTypeValid = fns.values(enums.NOTIFICATION_TYPES)
58+
var isNotificationTypeValid = jsSdkUtils.objectValues(enums.NOTIFICATION_TYPES)
5959
.indexOf(notificationType) > -1;
6060
if (!isNotificationTypeValid) {
6161
return -1;
@@ -165,7 +165,7 @@ NotificationCenter.prototype.sendNotifications = function (notificationType, not
165165
try {
166166
callback(notificationData);
167167
} catch (ex) {
168-
this.logger.log(LOG_LEVEL.ERROR, sprintf(LOG_MESSAGES.NOTIFICATION_LISTENER_EXCEPTION, MODULE_NAME, notificationType, ex.message));
168+
this.logger.log(LOG_LEVEL.ERROR, jsSdkUtils.sprintf(LOG_MESSAGES.NOTIFICATION_LISTENER_EXCEPTION, MODULE_NAME, notificationType, ex.message));
169169
}
170170
}.bind(this));
171171
} catch (e) {

packages/optimizely-sdk/lib/utils/fns/index.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
*/
1616
var uuid = require('uuid');
1717
var _isFinite = require('lodash/isFinite');
18-
var objectValues = require('@optimizely/js-sdk-utils').objectValues;
1918
var MAX_NUMBER_LIMIT = Math.pow(2, 53);
2019

2120
module.exports = {
@@ -34,6 +33,5 @@ module.exports = {
3433
uuid: function() {
3534
return uuid.v4();
3635
},
37-
values: objectValues,
3836
isNumber: require('lodash/isNumber'),
3937
};

0 commit comments

Comments
 (0)