easy-configuration
Advanced tools
Comparing version 1.6.4 to 1.6.5
{ | ||
"name": "easy-configuration", | ||
"description": "Simply extensible loader for json config files", | ||
"version": "1.6.4", | ||
"version": "1.6.5", | ||
"author": { | ||
@@ -27,3 +27,3 @@ "name": "David Kudera", | ||
"dependencies": { | ||
"recursive-merge": "~1.1.2" | ||
"recursive-merge": "~1.1.3" | ||
}, | ||
@@ -30,0 +30,0 @@ "devDependencies": { |
@@ -203,3 +203,3 @@ # Easy Configuration | ||
* 1.6.3 - 1.6.4 | ||
* 1.6.3 - 1.6.5 | ||
+ Bugs in IE8 | ||
@@ -206,0 +206,0 @@ |
@@ -183,3 +183,3 @@ /** Generated by SimQ **/ | ||
if (leftType !== rightType) { | ||
throw new Error('Can not merge ' + leftType + ' with ' + rightType); | ||
throw new Error('Can not merge ' + leftType + ' with ' + rightType + '.'); | ||
} | ||
@@ -191,3 +191,3 @@ switch (leftType) { | ||
valueType = type.call(value); | ||
if (valueType === '[object Array]' || valueType === '[object Object]') { | ||
if ((valueType === '[object Array]' || valueType === '[object Object]') && value !== null) { | ||
left[i] = merge(left[i], value); | ||
@@ -202,7 +202,9 @@ } else { | ||
value = right[name]; | ||
valueType = type.call(value); | ||
if (typeof left[name] === 'undefined') { | ||
left[name] = value; | ||
} else if (valueType === '[object Array]' || valueType === '[object Object]') { | ||
left[name] = merge(left[name], value); | ||
if (right.hasOwnProperty(name) && (name !== '__proto__')) { | ||
valueType = type.call(value); | ||
if (typeof left[name] === 'undefined' || left[name] === null) { | ||
left[name] = value; | ||
} else if (valueType === '[object Array]' || valueType === '[object Object]') { | ||
left[name] = merge(left[name], value); | ||
} | ||
} | ||
@@ -212,3 +214,3 @@ } | ||
default: | ||
throw new Error('Can not merge ' + leftType + ' objects'); | ||
throw new Error('Can not merge ' + leftType + ' objects.'); | ||
} | ||
@@ -988,3 +990,3 @@ return left; | ||
"description": "Simply extensible loader for json config files", | ||
"version": "1.6.4", | ||
"version": "1.6.5", | ||
"author": { | ||
@@ -1012,3 +1014,3 @@ "name": "David Kudera", | ||
"dependencies": { | ||
"recursive-merge": "~1.1.2" | ||
"recursive-merge": "~1.1.3" | ||
}, | ||
@@ -1042,3 +1044,3 @@ "devDependencies": { | ||
"description": "Recursive merge tool for arrays and objects", | ||
"version": "1.0.0", | ||
"version": "1.1.3", | ||
"author": { | ||
@@ -1065,8 +1067,10 @@ "name": "David Kudera", | ||
"devDependencies": { | ||
"should": "1.2.2" | ||
"should": "~1.2.2", | ||
"chai": "~1.8.1", | ||
"mocha": "~1.14.0" | ||
}, | ||
"scripts": { | ||
"test": "cd ./test; mocha ./index.js;" | ||
"test": "cd ./test; echo \"Testing in node:\"; mocha ./node/index.js --reporter spec; cd ./browser; echo \"Testing in browser:\"; mocha-phantomjs ./index.html;" | ||
}, | ||
"readme": "# Recursive merge\n\nRecursive merge tool for arrays and objects\n\n## Changelog\n\nChangelog is in the bottom of this readme.\n\n## Usage\n\nWith this tool, you can recursivelly merge arrays or objects.\n\n```\nvar merge = require('merge');\n\nvar result = merge(\n\t[1, 1, 2, 3],\n\t[3, 4, 4, 5],\n\t[10, 9, 8, 1]\n);\t\t\t\t// result: [1, 1, 2, 3, 3, 4, 4, 5, 10, 9, 8, 1]\n```\n\nAs you can see, this library just merging objects and not removing duplicates.\n\nYou should also know, that this affects first object passed to merge function. Overy other objects (arrays, objects) are\nadded to the first one. There is not any fast simple and universal solution for cloning objects (arrays yes).\n\nIn the same way, you can merge also objects.\n\nIf you will try to merge two different types of objects, exception will be thrown. Also if you will try to merge other\nobjects than arrays or objects, exception will be also thrown.\n\n## Changelog\n\n* 1.0.0\n\t+ Initial first version", | ||
"readme": "# Recursive merge\n\nRecursive merge tool for arrays and objects.\n\n## Installation\n\n```\n$ npm install recursive-merge\n```\n\n## Usage\n\nWith this tool, you can recursively merge arrays or objects.\n\n```\nvar merge = require('merge');\n\nvar result = merge(\n\t[1, 1, 2, 3],\n\t[3, 4, 4, 5],\n\t[10, 9, 8, 1]\n);\t\t\t\t// result: [1, 1, 2, 3, 3, 4, 4, 5, 10, 9, 8, 1]\n```\n\nAs you can see, this library just merging objects and not removing duplicates.\n\nYou should also know, that this affects first object passed to merge function. Every other objects (arrays, objects) are\nadded to the first one. There is not any fast simple and universal solution for cloning objects (arrays yes).\n\nIn the same way, you can merge also objects.\n\nIf you will try to merge two different types of objects, exception will be thrown. Also if you will try to merge other\nobjects than arrays or objects, exception will be also thrown.\n\n## Tests\n\n```\n$ npm test\n```\n\n## Changelog\n\n* 1.1.2 - 1.1.3\n\t+ Bugs in IE8\n\n* 1.1.0 - 1.1.1\n\t+ Rewritten tests\n\t+ Using chai for assertion (not should)\n\t+ Added some tests\n\t+ Added tests for browser\n\n* 1.0.0\n\t+ Initial first version", | ||
"readmeFilename": "README.md", | ||
@@ -1077,4 +1081,4 @@ "bugs": { | ||
"homepage": "https://github.com/sakren/node-recursive-merge", | ||
"_id": "recursive-merge@1.0.0", | ||
"_from": "recursive-merge@~1.0.0" | ||
"_id": "recursive-merge@1.1.3", | ||
"_from": "recursive-merge@~1.1.3" | ||
} | ||
@@ -1088,3 +1092,3 @@ | ||
}); | ||
require.__setStats({"recursive-merge/lib/Merge.js":{"atime":1385385635000,"mtime":1375346181000,"ctime":1385285362000},"/lib/Extension.js":{"atime":1385388163000,"mtime":1385388139000,"ctime":1385388139000},"/lib/Helpers.js":{"atime":1385388163000,"mtime":1385388139000,"ctime":1385388139000},"/lib/EasyConfiguration.js":{"atime":1385388163000,"mtime":1385388139000,"ctime":1385388139000},"/test/browser/tests/EasyConfiguration.coffee":{"atime":1385385683000,"mtime":1385385677000,"ctime":1385385677000},"/test/browser/tests/Helpers.coffee":{"atime":1385301964000,"mtime":1385301962000,"ctime":1385301962000},"/test/data/advanced.json":{"atime":1385385635000,"mtime":1385285347000,"ctime":1385285347000},"/test/data/circular.json":{"atime":1385308755000,"mtime":1385308754000,"ctime":1385308754000},"/test/data/config.json":{"atime":1385385635000,"mtime":1385285347000,"ctime":1385285347000},"/test/data/other.json":{"atime":1385385635000,"mtime":1385285347000,"ctime":1385285347000},"/test/data/unknownSection.json":{"atime":1385385635000,"mtime":1385285347000,"ctime":1385285347000},"/package.json":{"atime":1385388171000,"mtime":1385388166000,"ctime":1385388166000},"recursive-merge/package.json":{"atime":1385385635000,"mtime":1385285362000,"ctime":1385285362000}}); | ||
require.__setStats({"recursive-merge/lib/Merge.js":{"atime":1385388668000,"mtime":1385388458000,"ctime":1385388613000},"/lib/Extension.js":{"atime":1385388668000,"mtime":1385388653000,"ctime":1385388653000},"/lib/Helpers.js":{"atime":1385388668000,"mtime":1385388653000,"ctime":1385388653000},"/lib/EasyConfiguration.js":{"atime":1385388668000,"mtime":1385388653000,"ctime":1385388653000},"/test/browser/tests/EasyConfiguration.coffee":{"atime":1385385683000,"mtime":1385385677000,"ctime":1385385677000},"/test/browser/tests/Helpers.coffee":{"atime":1385388669000,"mtime":1385301962000,"ctime":1385301962000},"/test/data/advanced.json":{"atime":1385385635000,"mtime":1385285347000,"ctime":1385285347000},"/test/data/circular.json":{"atime":1385308755000,"mtime":1385308754000,"ctime":1385308754000},"/test/data/config.json":{"atime":1385385635000,"mtime":1385285347000,"ctime":1385285347000},"/test/data/other.json":{"atime":1385385635000,"mtime":1385285347000,"ctime":1385285347000},"/test/data/unknownSection.json":{"atime":1385385635000,"mtime":1385285347000,"ctime":1385285347000},"/package.json":{"atime":1385388668000,"mtime":1385388625000,"ctime":1385388625000},"recursive-merge/package.json":{"atime":1385388616000,"mtime":1385388613000,"ctime":1385388613000}}); | ||
require.version = '5.1.2'; | ||
@@ -1091,0 +1095,0 @@ |
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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
81693
1538
7
Updatedrecursive-merge@~1.1.3