UNPKG

layaair2-cmd

Version:

layaair version 2 toolkit

100 lines (99 loc) 3.29 kB
{ "_args": [ [ { "raw": "once@~1.3.0", "scope": null, "escapedName": "once", "name": "once", "rawSpec": "~1.3.0", "spec": ">=1.3.0 <1.4.0", "type": "range" }, "E:\\Mine\\Project\\git\\laya\\dawawa\\layaairdoc_cmd\\node_modules\\end-of-stream" ] ], "_from": "once@>=1.3.0 <1.4.0", "_id": "once@1.3.3", "_inCache": true, "_location": "/once", "_nodeVersion": "4.0.0", "_npmUser": { "name": "isaacs", "email": "i@izs.me" }, "_npmVersion": "3.3.2", "_phantomChildren": {}, "_requested": { "raw": "once@~1.3.0", "scope": null, "escapedName": "once", "name": "once", "rawSpec": "~1.3.0", "spec": ">=1.3.0 <1.4.0", "type": "range" }, "_requiredBy": [ "/end-of-stream", "/glob", "/inflight" ], "_resolved": "https://registry.npmjs.org/once/-/once-1.3.3.tgz", "_shasum": "b2e261557ce4c314ec8304f3fa82663e4297ca20", "_shrinkwrap": null, "_spec": "once@~1.3.0", "_where": "E:\\Mine\\Project\\git\\laya\\dawawa\\layaairdoc_cmd\\node_modules\\end-of-stream", "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me", "url": "http://blog.izs.me/" }, "bugs": { "url": "https://github.com/isaacs/once/issues" }, "dependencies": { "wrappy": "1" }, "description": "Run a function exactly one time", "devDependencies": { "tap": "^1.2.0" }, "directories": { "test": "test" }, "dist": { "shasum": "b2e261557ce4c314ec8304f3fa82663e4297ca20", "tarball": "https://registry.npmjs.org/once/-/once-1.3.3.tgz" }, "files": [ "once.js" ], "gitHead": "2ad558657e17fafd24803217ba854762842e4178", "homepage": "https://github.com/isaacs/once#readme", "keywords": [ "once", "function", "one", "single" ], "license": "ISC", "main": "once.js", "maintainers": [ { "name": "isaacs", "email": "i@izs.me" } ], "name": "once", "optionalDependencies": {}, "readme": "# once\n\nOnly call a function once.\n\n## usage\n\n```javascript\nvar once = require('once')\n\nfunction load (file, cb) {\n cb = once(cb)\n loader.load('file')\n loader.once('load', cb)\n loader.once('error', cb)\n}\n```\n\nOr add to the Function.prototype in a responsible way:\n\n```javascript\n// only has to be done once\nrequire('once').proto()\n\nfunction load (file, cb) {\n cb = cb.once()\n loader.load('file')\n loader.once('load', cb)\n loader.once('error', cb)\n}\n```\n\nIronically, the prototype feature makes this module twice as\ncomplicated as necessary.\n\nTo check whether you function has been called, use `fn.called`. Once the\nfunction is called for the first time the return value of the original\nfunction is saved in `fn.value` and subsequent calls will continue to\nreturn this value.\n\n```javascript\nvar once = require('once')\n\nfunction load (cb) {\n cb = once(cb)\n var stream = createStream()\n stream.once('data', cb)\n stream.once('end', function () {\n if (!cb.called) cb(new Error('not found'))\n })\n}\n```\n", "readmeFilename": "README.md", "repository": { "type": "git", "url": "git://github.com/isaacs/once.git" }, "scripts": { "test": "tap test/*.js" }, "version": "1.3.3" }