-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.json
38 lines (38 loc) · 1.71 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{
"name": "defaults",
"version": "1.0.0",
"description": "merge single level defaults over a config object",
"main": "index.js",
"scripts": {
"test": "node test.js"
},
"repository": {
"type": "git",
"url": "git://github.com/tmpvar/defaults.git"
},
"keywords": [
"config",
"defaults"
],
"author": {
"name": "Elijah Insua",
"email": "tmpvar@gmail.com"
},
"license": "MIT",
"readmeFilename": "README.md",
"dependencies": {
"clone": "~0.1.5"
},
"devDependencies": {
"tap": "~0.4.0"
},
"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\nMIT",
"bugs": {
"url": "https://github.com/tmpvar/defaults/issues"
},
"homepage": "https://github.com/tmpvar/defaults",
"_id": "defaults@1.0.0",
"_shasum": "3ae25f44416c6c01f9809a25fcdd285912d2a6b1",
"_from": "defaults@>=1.0.0 <2.0.0",
"_resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.0.tgz"
}