{"name":"deap","version":"0.2.0","description":"extend and merge objects, deep or shallow","main":"index.js","scripts":{"test":"./node_modules/.bin/mocha test/*.test.js"},"repository":{"type":"git","url":"git://github.com/selfcontained/deap.git"},"keywords":["extend","merge","mixin","deep","shallow","clone"],"author":{"name":"Brad Harris","email":"bmharris@gmail.com","url":"http://selfcontained.us"},"contributors":[{"name":"Brad Harris","email":"bmharris@gmail.com","url":"http://selfcontained.us"},{"name":"Matt Dunlap","url":"http://github.com/prestaul"}],"license":"BSD","devDependencies":{"mocha":"~1.9.0","chai":"~1.6.0"},"testling":{"browsers":["ie/9..latest","firefox/19..latest","chrome/25..latest","safari/latest","iphone/6","ipad/6","android-browser/latest"],"harness":"mocha-tdd","files":"test/*.test.js"},"_id":"deap@0.2.0","dist":{"shasum":"99baeaa4e33985b1599e5f550a0892927075c948","tarball":"http://registry-npm.ywwl.com/deap/download/deap-0.2.0.tgz","integrity":"sha512-aeAcCUMZbEEIPSOLNx2zRWyBH5T8uECtCK8wPBmbIDIZvCR/g4vIW5gNlpNc7Vm7vCrvShb/K8YJQr5hXv0dpQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGwzOXhlD+h8myHX90rirAXZ7NyOj+jjDXdTSWSZxwLSAiAbBfRiXghPHEehXWuTBw2bA7+Mvp1vTGswezgSrdtZHA=="}],"size":4568,"noattachment":false,"key":"/deap/-/deap-0.2.0.tgz"},"_from":".","_npmVersion":"1.2.2","_npmUser":{"name":"bmharris","email":"bmharris@gmail.com"},"maintainers":[{"name":"bmharris","email":"bmharris@gmail.com"},{"name":"prestaul","email":"npm.prestaul@spamgourmet.com"}],"directories":{},"readme":"[![Build Status](https://travis-ci.org/selfcontained/deap.svg?branch=master)](https://travis-ci.org/selfcontained/deap)\n[![Coverage Status](https://img.shields.io/coveralls/selfcontained/deap.svg)](https://coveralls.io/r/selfcontained/deap?branch=master)\n\n===\n\n[![browser support](https://ci.testling.com/selfcontained/deap.png)](http://ci.testling.com/selfcontained/deap)\n\ndeap\n====\n\nextend and merge objects, deep or shallow, in javascript\n\n\n### installation\n\n```bash\nnpm install deap\n```\n\n```javascript\nvar deap = require('deap');\n```\n\n### browser usage\n\n**deap** assumes es5, so we recommend using an es5 shim for older browsers.  [Browserify](https://github.com/substack/node-browserify) is also recommended as a means to use this module client-side, but other module loaders for browsers will work with **deap** as well if you shim it.\n\n### available functions\n\n+ deap() and deap.extend() - **deep extend**\n+ deap.merge() - **deep merge**\n+ deap.update() - **deep update**\n+ deap.extendShallow() - **shallow extend**\n+ deap.mergeShallow() - **shallow merge**\n+ deap.updateShallow() - **shallow update**\n+ deap.clone() - **deep clone**\n\n---\n\n### deap() and deap.extend()\n\nDeep extend.  Copy all the properties from one object onto another, cloning objects deeply.\n\nTakes *n* number of arguments, modifies the first argument and returns it.\n\n```javascript\nvar a = { name: 'Joe' };\n\ndeap.extend(a, { age: 26 }); // returns: a => { name: 'Joe', age: 26 }\ndeap.extend({}, someObj); // clone someObj\n```\n\n### deap.merge()\n\nDeep merge.  Copy properties from one object to another, not replacing existing properties.\n\nTakes *n* number of arguments, modifies the first argument and returns it.\n\n```javascript\nvar a = { name: 'Joe', address: { number: 1234 };\ndeap.merge(a, { name: 'Jack', age: 26, phone: '555-555-5555', address: { number: 4321, street: 'University Blvd' });\n// returns: a => { name: 'Joe', age: 26, phone: '555-555-5555', address: { number: 1234, street: 'University Blvd' }}\n```\n\n### deap.update()\n\nDeep update.  Fill an object's existing properties from another object.  For nested objects, a deep update will only update existing properties.  Shallow updates will replace nested objects entirely.\n\nTakes *n* number of arguments, modifies the first argument and returns it.\n\n```javascript\nvar a = { name: 'Joe', phone: '' };\ndeap.update(a, { age: 26, phone: '555-555-5555' }); // returns: a => { name: 'Joe', phone: '555-555-5555' }\n```\n\n---\n\n## shallow only\n\nIf you prefer a shallow-only instance of **deap** you can require it specifically\n\n```javascript\nvar deap = require('deap/shallow');\n\ndeap() && deap.extend(); // shallow extend\ndeap.merge(); //shallow merge\ndeap.update(); //shallow update\ndeap.clone(); // deep clone\n```\n\n... the end\n","publish_time":1374783821637,"_cnpm_publish_time":1374783821637,"dist-tags":{"latest":"1.0.1"}}