15 lines
1.8 KiB
JSON
15 lines
1.8 KiB
JSON
{
|
|
"name": "merge",
|
|
"version": "1.1.0",
|
|
"author": {
|
|
"name": "yeikos"
|
|
},
|
|
"description": "JavaScript/NodeJS Merge is a tool to merge multiple objects into one object, with the possibility of create a new object cloned. His operation is very similar to the jQuery.extend function but more flexible.",
|
|
"homepage": "https://github.com/yeikos/js.merge",
|
|
"main": "merge.js",
|
|
"readme": "JavaScript/NodeJS Merge v1.1.0\r\n==================================================\r\n\r\nWhat is it?\r\n--------------------------------------\r\n\r\nJavaScript/NodeJS Merge is a tool to merge multiple objects into one object, with the possibility of create a new object cloned. His operation is very similar to the [jQuery.extend](http://api.jquery.com/jQuery.extend/) function but more flexible.\r\n\r\nExample from NodeJS\r\n--------------\r\n\r\n\tvar merge = require('merge'), // npm install -g merge\r\n\t\toriginal, cloned;\r\n\t\r\n\tconsole.log(\r\n\t\t\r\n\t\tmerge({ one: 'hello' }, { two: 'world' })\r\n\r\n\t); // {\"one\": \"hello\", \"two\": \"world\"}\r\n\t\r\n\toriginal = { x: { y: 1 } };\r\n\r\n\tcloned = merge(true, original);\r\n\r\n\tcloned.x.y++;\r\n\r\n\tconsole.log(original.x.y, cloned.x.y); // 1, 2\r\n\r\nExample from JavaScript browser\r\n--------------------------\r\n\r\n\t<script src=\"http://yeikos.googlecode.com/files/merge.js\"></script>\r\n\t\r\n\t<script>\r\n\t\t\r\n\t\tvar original, cloned;\r\n\t\t\r\n\t\tconsole.log(\r\n\t\t\t\r\n\t\t\tmerge({ one: 'hello' }, { two: 'world' })\r\n\t\r\n\t\t); // {\"one\": \"hello\", \"two\": \"world\"}\r\n\t\t\r\n\t\toriginal = { x: { y: 1 } };\r\n\t\r\n\t\tcloned = merge(true, original);\r\n\t\r\n\t\tcloned.x.y++;\r\n\t\r\n\t\tconsole.log(original.x.y, cloned.x.y); // 1, 2\r\n\r\n\t</script>",
|
|
"readmeFilename": "README.md",
|
|
"_id": "merge@1.1.0",
|
|
"_from": "merge@"
|
|
}
|