UNPKG

motion

Version:

motion - moving development forward

94 lines (93 loc) 5.13 kB
{ "_args": [ [ "deap@https://registry.npmjs.org/deap/-/deap-1.0.0.tgz", "/Users/nw/flint/packages/flint" ] ], "_from": "deap@>=1.0.0 <2.0.0", "_id": "deap@1.0.0", "_inCache": true, "_location": "/deap", "_phantomChildren": {}, "_requested": { "name": "deap", "raw": "deap@https://registry.npmjs.org/deap/-/deap-1.0.0.tgz", "rawSpec": "https://registry.npmjs.org/deap/-/deap-1.0.0.tgz", "scope": null, "spec": "https://registry.npmjs.org/deap/-/deap-1.0.0.tgz", "type": "remote" }, "_requiredBy": [ "/gulp-uglify" ], "_resolved": "https://registry.npmjs.org/deap/-/deap-1.0.0.tgz", "_shasum": "b148bf82430a27699b7483a03eb6b67585bfc888", "_shrinkwrap": null, "_spec": "deap@https://registry.npmjs.org/deap/-/deap-1.0.0.tgz", "_where": "/Users/nw/flint/packages/flint", "author": { "email": "bmharris@gmail.com", "name": "Brad Harris", "url": "http://selfcontained.us" }, "bugs": { "url": "https://github.com/selfcontained/deap/issues" }, "contributors": [ { "name": "Brad Harris", "email": "bmharris@gmail.com", "url": "http://selfcontained.us" }, { "name": "Matt Dunlap", "url": "http://github.com/prestaul" } ], "dependencies": {}, "description": "extend and merge objects, deep or shallow", "devDependencies": { "chai": "~1.6.0", "coveralls": "^2.10.0", "istanbul": "^0.2.8", "mocha": "~1.9.0" }, "homepage": "https://github.com/selfcontained/deap#readme", "keywords": [ "clone", "deep", "extend", "merge", "mixin", "shallow" ], "license": "MIT", "main": "index.js", "name": "deap", "optionalDependencies": {}, "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.\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", "readmeFilename": "README.md", "repository": { "type": "git", "url": "git://github.com/selfcontained/deap.git" }, "scripts": { "coverage": "istanbul cover --report html node_modules/.bin/_mocha", "coveralls": "istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- && cat ./coverage/lcov.info | coveralls", "test": "mocha test/*.test.js" }, "testling": { "browsers": [ "android-browser/latest", "chrome/25..latest", "firefox/19..latest", "ie/9..latest", "ipad/latest", "iphone/latest" ], "files": "test/*.test.js", "harness": "mocha-tdd" }, "version": "1.0.0" }