Skip to content

Commit 99ab0e4

Browse files
committed
Removing collections dependency
1 parent 2cdda2b commit 99ab0e4

File tree

2 files changed

+7
-12
lines changed

2 files changed

+7
-12
lines changed

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
"app-root-path": "^2.1.0",
1818
"chai": "^4.1.2",
1919
"chai-as-promised": "^7.1.1",
20-
"collections": "^5.1.2",
2120
"jwt-simple": "^0.5.1",
2221
"memory-cache": "^0.2.0",
2322
"node-forge": ">=1.0.0",

src/authentication/core/MerchantConfig.js

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
var Constants = require('../util/Constants');
44
var Logger = require('../logging/Logger');
5-
var Map = require('collections/map');
65
var ApiException = require('../util/ApiException');
76
var LogConfiguration = require('../logging/LogConfiguration');
87

@@ -514,17 +513,14 @@ MerchantConfig.prototype.defaultPropValues = function defaultPropValues() {
514513
hiddenPropertiesArray.push(each.trim());
515514
});
516515

517-
var merchantMap = new Map(Object.entries(merchantConfig));
518-
//iterating the merchantConfig Object
519-
merchantMap.forEach(function (value, key) {
520-
hiddenPropertiesArray.forEach(function (hide) {
521-
if (key === hide) {
522-
merchantMap.delete(key);
523-
}
524-
})
525-
});
516+
const filteredMerchantConfig = {};
517+
for (key in merchantConfig) {
518+
if (!hiddenPropertiesArray.includes(key)) {
519+
filteredMerchantConfig[key] = merchantConfig[key];
520+
}
521+
}
526522

527-
return merchantMap.toObject();
523+
return filteredMerchantConfig;
528524
}
529525
if(!this.logConfiguration.isExternalLoggerSet){
530526
logger.clear();

0 commit comments

Comments
 (0)