Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions packages/optimizely-sdk/lib/core/notification_center/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

var enums = require('../../utils/enums');
var fns = require('../../utils/fns');
var sprintf = require('@optimizely/js-sdk-utils').sprintf;
var jsSdkUtils = require('@optimizely/js-sdk-utils');

var LOG_LEVEL = enums.LOG_LEVEL;
var LOG_MESSAGES = enums.LOG_MESSAGES;
Expand Down Expand Up @@ -55,7 +55,7 @@ function NotificationCenter(options) {
*/
NotificationCenter.prototype.addNotificationListener = function (notificationType, callback) {
try {
var isNotificationTypeValid = fns.values(enums.NOTIFICATION_TYPES)
var isNotificationTypeValid = jsSdkUtils.objectValues(enums.NOTIFICATION_TYPES)
.indexOf(notificationType) > -1;
if (!isNotificationTypeValid) {
return -1;
Expand Down Expand Up @@ -165,7 +165,7 @@ NotificationCenter.prototype.sendNotifications = function (notificationType, not
try {
callback(notificationData);
} catch (ex) {
this.logger.log(LOG_LEVEL.ERROR, sprintf(LOG_MESSAGES.NOTIFICATION_LISTENER_EXCEPTION, MODULE_NAME, notificationType, ex.message));
this.logger.log(LOG_LEVEL.ERROR, jsSdkUtils.sprintf(LOG_MESSAGES.NOTIFICATION_LISTENER_EXCEPTION, MODULE_NAME, notificationType, ex.message));
}
}.bind(this));
} catch (e) {
Expand Down
1 change: 0 additions & 1 deletion packages/optimizely-sdk/lib/utils/fns/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ module.exports = {
uuid: function() {
return uuid.v4();
},
values: require('lodash/values'),
isNumber: function(value) {
return typeof value === 'number';
},
Expand Down