%PDF- %PDF-
Direktori : /home/waritko/.npm/registry.npmjs.org/once/ |
Current File : //home/waritko/.npm/registry.npmjs.org/once/.cache.json |
{"_id":"once","_rev":"16-4a93fc16e1166f19d79182da8126a321","name":"once","description":"Run a function exactly one time","dist-tags":{"latest":"1.3.1"},"versions":{"1.1.1":{"name":"once","version":"1.1.1","description":"Run a function exactly one time","main":"once.js","directories":{"test":"test"},"dependencies":{},"devDependencies":{"tap":"~0.3.0"},"scripts":{"test":"tap test/*.js"},"repository":{"type":"git","url":"git://github.com/isaacs/once"},"keywords":["once","function","one","single"],"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"license":"BSD","_id":"once@1.1.1","dist":{"shasum":"9db574933ccb08c3a7614d154032c09ea6f339e7","tarball":"http://registry.npmjs.org/once/-/once-1.1.1.tgz"},"_npmVersion":"1.1.48","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}]},"1.2.0":{"name":"once","version":"1.2.0","description":"Run a function exactly one time","main":"once.js","directories":{"test":"test"},"dependencies":{},"devDependencies":{"tap":"~0.3.0"},"scripts":{"test":"tap test/*.js"},"repository":{"type":"git","url":"git://github.com/isaacs/once"},"keywords":["once","function","one","single"],"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"license":"BSD","bugs":{"url":"https://github.com/isaacs/once/issues"},"_id":"once@1.2.0","dist":{"shasum":"de1905c636af874a8fba862d9aabddd1f920461c","tarball":"http://registry.npmjs.org/once/-/once-1.2.0.tgz"},"_from":".","_npmVersion":"1.3.7","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}]},"1.3.0":{"name":"once","version":"1.3.0","description":"Run a function exactly one time","main":"once.js","directories":{"test":"test"},"dependencies":{},"devDependencies":{"tap":"~0.3.0"},"scripts":{"test":"tap test/*.js"},"repository":{"type":"git","url":"git://github.com/isaacs/once"},"keywords":["once","function","one","single"],"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"license":"BSD","bugs":{"url":"https://github.com/isaacs/once/issues"},"_id":"once@1.3.0","dist":{"shasum":"151af86bfc1f08c4b9f07d06ab250ffcbeb56581","tarball":"http://registry.npmjs.org/once/-/once-1.3.0.tgz"},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}]},"1.3.1":{"name":"once","version":"1.3.1","description":"Run a function exactly one time","main":"once.js","directories":{"test":"test"},"dependencies":{"wrappy":"1"},"devDependencies":{"tap":"~0.3.0"},"scripts":{"test":"tap test/*.js"},"repository":{"type":"git","url":"git://github.com/isaacs/once"},"keywords":["once","function","one","single"],"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"license":"BSD","gitHead":"c90ac02a74f433ce47f6938869e68dd6196ffc2c","bugs":{"url":"https://github.com/isaacs/once/issues"},"homepage":"https://github.com/isaacs/once","_id":"once@1.3.1","_shasum":"f3f3e4da5b7d27b5c732969ee3e67e729457b31f","_from":".","_npmVersion":"2.0.0","_nodeVersion":"0.10.31","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"dist":{"shasum":"f3f3e4da5b7d27b5c732969ee3e67e729457b31f","tarball":"http://registry.npmjs.org/once/-/once-1.3.1.tgz"}}},"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","maintainers":[{"name":"isaacs","email":"i@izs.me"}],"time":{"modified":"2014-09-18T23:05:04.887Z","created":"2012-08-14T07:25:56.929Z","1.1.1":"2012-08-14T07:25:58.262Z","1.2.0":"2013-08-12T02:55:21.962Z","1.3.0":"2013-10-24T06:27:26.638Z","1.3.1":"2014-09-18T23:05:04.887Z"},"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"repository":{"type":"git","url":"git://github.com/isaacs/once"},"users":{"stdarg":true,"yi":true,"abg":true,"chengen":true,"novaleaf":true},"homepage":"https://github.com/isaacs/once","keywords":["once","function","one","single"],"bugs":{"url":"https://github.com/isaacs/once/issues"},"license":"BSD","readmeFilename":"README.md","_attachments":{},"_etag":"\"DJOB9Y1TGFII9171OKETILB4V\""}