motion
Version:
motion - moving development forward
62 lines (61 loc) • 2.31 kB
JSON
{
"_args": [
[
"wrappy@https://registry.npmjs.org/wrappy/-/wrappy-1.0.1.tgz",
"/Users/nw/flint/packages/flint"
]
],
"_from": "wrappy@>=1.0.0 <2.0.0",
"_id": "wrappy@1.0.1",
"_inCache": true,
"_location": "/wrappy",
"_phantomChildren": {},
"_requested": {
"name": "wrappy",
"raw": "wrappy@https://registry.npmjs.org/wrappy/-/wrappy-1.0.1.tgz",
"rawSpec": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.1.tgz",
"scope": null,
"spec": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.1.tgz",
"type": "remote"
},
"_requiredBy": [
"/inflight",
"/once"
],
"_resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.1.tgz",
"_shasum": "1e65969965ccbc2db4548c6b84a6f2c5aedd4739",
"_shrinkwrap": null,
"_spec": "wrappy@https://registry.npmjs.org/wrappy/-/wrappy-1.0.1.tgz",
"_where": "/Users/nw/flint/packages/flint",
"author": {
"email": "i@izs.me",
"name": "Isaac Z. Schlueter",
"url": "http://blog.izs.me/"
},
"bugs": {
"url": "https://github.com/npm/wrappy/issues"
},
"dependencies": {},
"description": "Callback wrapping utility",
"devDependencies": {
"tap": "^0.4.12"
},
"directories": {
"test": "test"
},
"homepage": "https://github.com/npm/wrappy",
"license": "ISC",
"main": "wrappy.js",
"name": "wrappy",
"optionalDependencies": {},
"readme": "# wrappy\n\nCallback wrapping utility\n\n## USAGE\n\n```javascript\nvar wrappy = require(\"wrappy\")\n\n// var wrapper = wrappy(wrapperFunction)\n\n// make sure a cb is called only once\n// See also: http://npm.im/once for this specific use case\nvar once = wrappy(function (cb) {\n var called = false\n return function () {\n if (called) return\n called = true\n return cb.apply(this, arguments)\n }\n})\n\nfunction printBoo () {\n console.log('boo')\n}\n// has some rando property\nprintBoo.iAmBooPrinter = true\n\nvar onlyPrintOnce = once(printBoo)\n\nonlyPrintOnce() // prints 'boo'\nonlyPrintOnce() // does nothing\n\n// random property is retained!\nassert.equal(onlyPrintOnce.iAmBooPrinter, true)\n```\n",
"readmeFilename": "README.md",
"repository": {
"type": "git",
"url": "git+https://github.com/npm/wrappy.git"
},
"scripts": {
"test": "tap test/*.js"
},
"version": "1.0.1"
}