UNPKG

motion

Version:

motion - moving development forward

63 lines (62 loc) 2.52 kB
{ "_args": [ [ "defaults@https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz", "/Users/nw/flint/packages/flint" ] ], "_from": "defaults@>=1.0.0 <2.0.0", "_id": "defaults@1.0.3", "_inCache": true, "_location": "/defaults", "_phantomChildren": {}, "_requested": { "name": "defaults", "raw": "defaults@https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz", "rawSpec": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz", "scope": null, "spec": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz", "type": "remote" }, "_requiredBy": [ "/vinyl-fs" ], "_resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz", "_shasum": "c656051e9817d9ff08ed881477f3fe4019f3ef7d", "_shrinkwrap": null, "_spec": "defaults@https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz", "_where": "/Users/nw/flint/packages/flint", "author": { "email": "tmpvar@gmail.com", "name": "Elijah Insua" }, "bugs": { "url": "https://github.com/tmpvar/defaults/issues" }, "dependencies": { "clone": "^1.0.2" }, "description": "merge single level defaults over a config object", "devDependencies": { "tap": "^2.0.0" }, "homepage": "https://github.com/tmpvar/defaults#readme", "keywords": [ "config", "defaults" ], "license": "MIT", "main": "index.js", "name": "defaults", "optionalDependencies": {}, "readme": "# defaults\n\nA simple one level options merge utility\n\n## install\n\n`npm install defaults`\n\n## use\n\n```javascript\n\nvar defaults = require('defaults');\n\nvar handle = function(options, fn) {\n options = defaults(options, {\n timeout: 100\n });\n\n setTimeout(function() {\n fn(options);\n }, options.timeout);\n}\n\nhandle({ timeout: 1000 }, function() {\n // we're here 1000 ms later\n});\n\nhandle({ timeout: 10000 }, function() {\n // we're here 10s later\n});\n\n```\n\n## summary\n\nthis module exports a function that takes 2 arguments: `options` and `defaults`. When called, it overrides all of `undefined` properties in `options` with the clones of properties defined in `defaults`\n\nSidecases: if called with a falsy `options` value, options will be initialized to a new object before being merged onto.\n\n## license\n\n[MIT](LICENSE)\n", "readmeFilename": "README.md", "repository": { "type": "git", "url": "git://github.com/tmpvar/defaults.git" }, "scripts": { "test": "node test.js" }, "version": "1.0.3" }