aboutsummaryrefslogtreecommitdiffstats
path: root/npm_assets/node_modules/merge/README.md
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@unit193.net>2021-02-03 19:17:00 -0500
committerLibravatarUnit 193 <unit193@unit193.net>2021-02-03 19:17:00 -0500
commit3a0d66f07b112b6d2bdc2b57bbf717a89a351ce6 (patch)
treea7cf56282e54f05785243bc1e903d6594f2c06ba /npm_assets/node_modules/merge/README.md
parent787b97a4cb24330b36f11297c6d3a7a473a907d0 (diff)
New upstream version 8.1.2.upstream/8.1.2
Diffstat (limited to 'npm_assets/node_modules/merge/README.md')
-rw-r--r--npm_assets/node_modules/merge/README.md58
1 files changed, 58 insertions, 0 deletions
diff --git a/npm_assets/node_modules/merge/README.md b/npm_assets/node_modules/merge/README.md
new file mode 100644
index 0000000..1d38059
--- /dev/null
+++ b/npm_assets/node_modules/merge/README.md
@@ -0,0 +1,58 @@
+# Merge
+
+Merge multiple objects into one, optionally creating a new cloned object.
+Similar to the jQuery.extend but more flexible. Works in Node.js and the
+browser.
+
+## Node.js Usage
+
+```sh
+npm install merge --save
+```
+
+```js
+var merge = require('merge'), original, cloned;
+
+console.log(merge({one:'hello'}, {two: 'world'}));
+// -> {"one": "hello", "two": "world"}
+
+original = { x: { y: 1 } };
+cloned = merge(true, original);
+cloned.x.y++;
+
+console.log(original.x.y, cloned.x.y);
+// -> 1, 2
+
+console.log(merge.recursive(true, original, { x: { z: 2 } }));
+// -> {"x": { "y": 1, "z": 2 } }
+
+```
+
+## Browser Usage
+
+```html
+<script src="https://cdn.jsdelivr.net/gh/yeikos/js.merge/merge.js"></script>
+<script>
+ var original, cloned;
+
+ console.log(merge({one:'hello'}, {two: 'world'}));
+ // -> {"one": "hello", "two": "world"}
+
+ original = { x: { y: 1 } };
+ cloned = merge(true, original);
+ cloned.x.y++;
+
+ console.log(original.x.y, cloned.x.y);
+ // -> 1, 2
+
+ console.log(merge.recursive(true, original, { x: { z: 2 } }));
+ // -> {"x": { "y": 1, "z": 2 } }
+
+</script>
+```
+
+## Tests
+
+```sh
+npm test
+```