Update node modules

This commit is contained in:
Stanley Goldman
2019-12-13 09:19:15 -05:00
parent 9e7ce49a73
commit dc257a3a4f
85 changed files with 4949 additions and 6699 deletions

View File

@@ -37,12 +37,16 @@ exports.isEmptyObject = function(obj) {
* @param {*} target
* @param {*} a
*/
exports.merge = function(target, a) {
exports.merge = function(target, a, arrayMode) {
if (a) {
const keys = Object.keys(a); // will return an array of own properties
const len = keys.length; //don't make it inline
for (let i = 0; i < len; i++) {
target[keys[i]] = a[keys[i]];
if(arrayMode === 'strict'){
target[keys[i]] = [ a[keys[i]] ];
}else{
target[keys[i]] = a[keys[i]];
}
}
}
};