{"_id":"wrappy","_rev":"930","name":"wrappy","description":"Callback wrapping utility","dist-tags":{"latest":"1.0.2"},"maintainers":[{"name":"isaacs","email":""}],"time":{"modified":"2021-06-03T09:55:55.000Z","created":"2014-09-18T22:59:23.410Z","0.0.0":"2021-04-22T23:17:34.192Z","1.0.2":"2016-05-17T23:30:52.415Z","1.0.1":"2014-09-18T23:13:15.838Z","1.0.0":"2014-09-18T22:59:23.410Z"},"users":{"program247365":true,"klap-webdevelopment":true,"mojaray2k":true},"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"repository":{"type":"git","url":"git+https://github.com/npm/wrappy.git"},"versions":{"0.0.0":{"name":"wrappy","version":"0.0.0","publishConfig":{"tag":"testing"},"description":"Callback wrapping utility","main":"wrappy.js","directories":{"test":"test"},"dependencies":{},"devDependencies":{"tap":"^1.2.0"},"scripts":{"test":"tap test/*.js"},"repository":{"type":"git","url":"git+https://github.com/npm/wrappy.git"},"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"license":"ISC","bugs":{"url":"https://github.com/npm/wrappy/issues"},"homepage":"https://github.com/npm/wrappy","readmeFilename":"README.md","gitHead":"6ff331c0ea9d4525d17d12fb5a1c7933c8d84c20","_id":"wrappy@0.0.0","_nodeVersion":"16.0.0","_npmVersion":"7.10.0","dist":{"shasum":"adf927968d3c4aa3e5cac7a47e714086086dcc25","size":2064,"noattachment":false,"key":"/wrappy/-/wrappy-0.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/wrappy/download/wrappy-0.0.0.tgz"},"_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/wrappy_0.0.0_1619133453839_0.3872619564603934"},"_hasShrinkwrap":false,"publish_time":1619133454192,"_cnpm_publish_time":1619133454192},"1.0.2":{"name":"wrappy","version":"1.0.2","description":"Callback wrapping utility","main":"wrappy.js","files":["wrappy.js"],"directories":{"test":"test"},"dependencies":{},"devDependencies":{"tap":"^2.3.1"},"scripts":{"test":"tap --coverage test/*.js"},"repository":{"type":"git","url":"git+https://github.com/npm/wrappy.git"},"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"license":"ISC","bugs":{"url":"https://github.com/npm/wrappy/issues"},"homepage":"https://github.com/npm/wrappy","gitHead":"71d91b6dc5bdeac37e218c2cf03f9ab55b60d214","_id":"wrappy@1.0.2","_shasum":"b5243d8f3ec1aa35f1364605bc0d1036e30ab69f","_from":".","_npmVersion":"3.9.1","_nodeVersion":"5.10.1","_npmUser":{"name":"zkat","email":"kat@sykosomatic.org"},"dist":{"shasum":"b5243d8f3ec1aa35f1364605bc0d1036e30ab69f","size":1676,"noattachment":false,"key":"/wrappy/-/wrappy-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/wrappy/download/wrappy-1.0.2.tgz"},"maintainers":[{"name":"isaacs","email":""}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/wrappy-1.0.2.tgz_1463527848281_0.037129373755306005"},"publish_time":1463527852415,"_cnpm_publish_time":1463527852415,"_hasShrinkwrap":false},"1.0.1":{"name":"wrappy","version":"1.0.1","description":"Callback wrapping utility","main":"wrappy.js","directories":{"test":"test"},"dependencies":{},"devDependencies":{"tap":"^0.4.12"},"scripts":{"test":"tap test/*.js"},"repository":{"type":"git","url":"https://github.com/npm/wrappy"},"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"license":"ISC","bugs":{"url":"https://github.com/npm/wrappy/issues"},"homepage":"https://github.com/npm/wrappy","gitHead":"006a8cbac6b99988315834c207896eed71fd069a","_id":"wrappy@1.0.1","_shasum":"1e65969965ccbc2db4548c6b84a6f2c5aedd4739","_from":".","_npmVersion":"2.0.0","_nodeVersion":"0.10.31","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":""}],"dist":{"shasum":"1e65969965ccbc2db4548c6b84a6f2c5aedd4739","size":2010,"noattachment":false,"key":"/wrappy/-/wrappy-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/wrappy/download/wrappy-1.0.1.tgz"},"publish_time":1411081995838,"_cnpm_publish_time":1411081995838,"_hasShrinkwrap":false},"1.0.0":{"name":"wrappy","version":"1.0.0","description":"Callback wrapping utility","main":"wrappy.js","directories":{"test":"test"},"dependencies":{},"devDependencies":{"tap":"^0.4.12"},"scripts":{"test":"tap test/*.js"},"repository":{"type":"git","url":"https://github.com/npm/wrappy"},"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"license":"ISC","bugs":{"url":"https://github.com/npm/wrappy/issues"},"homepage":"https://github.com/npm/wrappy","gitHead":"2a0cf2a39be2ebb4a53f2f87db739d98f2a5ebc5","_id":"wrappy@1.0.0","_shasum":"8aae4fc6b4cd6be32a4553985bcf32b3ee131e4e","_from":".","_npmVersion":"2.0.0","_nodeVersion":"0.10.31","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":""}],"dist":{"shasum":"8aae4fc6b4cd6be32a4553985bcf32b3ee131e4e","size":1952,"noattachment":false,"key":"/wrappy/-/wrappy-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/wrappy/download/wrappy-1.0.0.tgz"},"publish_time":1411081163410,"_cnpm_publish_time":1411081163410,"_hasShrinkwrap":false}},"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","_attachments":{},"homepage":"https://github.com/npm/wrappy","bugs":{"url":"https://github.com/npm/wrappy/issues"},"license":"ISC"}