Comparing version 0.2.4 to 0.2.5
44
index.js
@@ -198,4 +198,4 @@ /** | ||
if (target === source || // for primitives or null | ||
undefined === source // target stays the same | ||
if (target === source || // for primitives or null | ||
undefined === source // target stays the same | ||
) { | ||
@@ -282,3 +282,3 @@ return target | ||
for (key in source) { | ||
if (source.hasOwnProperty(key)) { | ||
if (source.hasOwnProperty(key) && key !== '__proto__') { | ||
target[key] = _merge(opts, target[key], source[key]) | ||
@@ -360,16 +360,16 @@ } | ||
keys | ||
.split('.') | ||
.map(_segment('.')) | ||
.forEach(function (k) { | ||
k = (k || ' ').trim() | ||
.replace(/^([^[]+)\[(["']?)(.+)\2\]$/, function (m, m1, m2, m3) { | ||
if (m1 && m3) { | ||
out.push(m1, m3) | ||
} | ||
return '' | ||
}) | ||
if (k) { | ||
out.push(k) | ||
} | ||
}) | ||
.split('.') | ||
.map(_segment('.')) | ||
.forEach(function (k) { | ||
k = (k || ' ').trim() | ||
.replace(/^([^[]+)\[(["']?)(.+)\2\]$/, function (m, m1, m2, m3) { | ||
if (m1 && m3) { | ||
out.push(m1, m3) | ||
} | ||
return '' | ||
}) | ||
if (k) { | ||
out.push(k) | ||
} | ||
}) | ||
keys = out | ||
@@ -392,7 +392,7 @@ } | ||
props = props | ||
.split(',') | ||
.map(_segment(',')) | ||
.filter(function (k) { | ||
return k | ||
}) | ||
.split(',') | ||
.map(_segment(',')) | ||
.filter(function (k) { | ||
return k | ||
}) | ||
} | ||
@@ -399,0 +399,0 @@ if (util.isArray(props)) { |
{ | ||
"name": "mergee", | ||
"version": "0.2.5", | ||
"description": "Utilities for objects", | ||
"version": "0.2.4", | ||
"keywords": [ | ||
"clone", | ||
"extend", | ||
"merge", | ||
"object" | ||
], | ||
"homepage": "https://github.com/commenthol/mergee", | ||
"bugs": { | ||
"url": "https://github.com/commenthol/mergee/issues" | ||
}, | ||
"license": "MIT", | ||
"author": "commenthol <commenthol@gmail.com>", | ||
"main": "index.js", | ||
"engines": { | ||
"node": ">=0.8.0" | ||
}, | ||
"directories": { | ||
@@ -13,30 +22,13 @@ "doc": "doc", | ||
}, | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"mocha": "~3.2.0" | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/commenthol/mergee" | ||
}, | ||
"scripts": { | ||
"test": "mocha test/*.mocha.js", | ||
"clean": "rm -rf doc coverage", | ||
"cover": "istanbul cover _mocha --report lcov --report text -- -R dot --check-leaks test/*.mocha.js", | ||
"doc": "mkdir -p doc && jsdox -o doc index.js", | ||
"lint": "eslint '*.js' '**/*.js'", | ||
"doc": "mkdir -p doc && jsdox -o doc index.js", | ||
"clean": "rm -rf doc coverage" | ||
"test": "mocha test/*.mocha.js" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/commenthol/mergee" | ||
}, | ||
"keywords": [ | ||
"merge", | ||
"extend", | ||
"clone", | ||
"object" | ||
], | ||
"author": "commenthol <commenthol@gmail.com>", | ||
"maintainers": "commenthol <commenthol@gmail.com>", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/commenthol/mergee/issues" | ||
}, | ||
"homepage": "https://github.com/commenthol/mergee", | ||
"eslintConfig": { | ||
@@ -48,3 +40,11 @@ "extends": "standard", | ||
"rules": {} | ||
} | ||
}, | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"mocha": "~5.2.0" | ||
}, | ||
"engines": { | ||
"node": ">=0.8.0" | ||
}, | ||
"maintainers": "commenthol <commenthol@gmail.com>" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
32042
0