{"_id":"@simpleview/promiselib","_rev":"36-885cd5043eeb1497a12189c119e7ce8b","name":"@simpleview/promiselib","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.1":{"name":"@simpleview/promiselib","version":"1.0.1","author":{"name":"owenallenaz@gmail.com"},"license":"ISC","_id":"@simpleview/promiselib@1.0.1","maintainers":[{"name":"araymer","email":"aaronraymer26@gmail.com"},{"name":"svjoshua","email":"jmoor@simpleviewinc.com"},{"name":"qman33","email":"gotshogi@gmail.com"},{"name":"seanmalbert","email":"smabert@gmail.com"},{"name":"owenallenaz","email":"owenallenaz@gmail.com"}],"homepage":"https://github.com/simpleviewinc/sv-npm-promiselib#readme","bugs":{"url":"https://github.com/simpleviewinc/sv-npm-promiselib/issues"},"dist":{"shasum":"9504d0569075e42a6aa5b06fb44054fb7a93e792","tarball":"https://registry.npmjs.org/@simpleview/promiselib/-/promiselib-1.0.1.tgz","fileCount":4,"integrity":"sha512-ZQTxR3DzGfy+h8Oymm86hCddSXxMo7XsUYtDXs8C5MaVa/y4qMRHhROPSCoWLYYt1Qj1c+S8XQfwifW4KryMew==","signatures":[{"sig":"MEUCIAKyWpfQHyh0KPnKYospz3RzBHgLtoH425TDZ+i85PIvAiEA9SG4ocJ7eowODIlf2rdSE0Hm2weUVAXct/m3LqYJaL8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2806,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeDj74CRA9TVsSAnZWagAADMsQAKFEfE5rUhrdqWeX56rl\ngb3uytTvlVAGPSitvNgfSaamYKQb2j+c+Xgx4P/XIfYYmNtYapNPAybigQnL\nt3NYF6SpVuH/UXPc1D9yPWQeE23sTGyAmVX95m8qoDzKqbcZejQXeKfHnyBM\nyWHvxPsLLhfr5WTQuXNu3mXl4fRMWOkIaCN5Jv9mQosbjOcelPCpFut90Vn4\nQgXufEBlXnCiXrPHAkQcCoPaMv8zkN+z6Y7o8vVKxJBsy9LWZQ84LTHfrMlh\ndeNEXoexn656rWMAt4GyJhQSZ3D9LC9qgM7Nl/Nh7nHuchYoRP22Oxnf6vGo\nytg2J19J6rkIOWKR0UnmHlZj0c8v3ukjojwNl0gOiM/J71yFG6jzByT7rqOs\nrmAQvQqgoHgagJm1+R1lO5iHHsD2ZueY3RwuLbfV8OmS6LJrOrmxfKKf1EfG\ngp9BH7oUPSptMBocrj9qFPdFycuXlg3fitVyCLKERT9d32WthCeK4CGudjSn\n7GjsdOR1kYXdpNfTiUb2JcLPjj8ms519V9hJ8rKrYp7wtsTD8GUg/bLHXb5L\nzhiF1Izag+1oiGVKZ+nZVoytDkoZZLYmufhI0X4HQSDbR6aN0FzaR7aXbmFb\ngZQseDuCPyUTpifXxSXfzdsS9miG6IHKBt0BSHbVNhtaepYFNFp5bMLxYoNy\n6xgg\r\n=Ce4J\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","gitHead":"f8fa9c595895fa9bb30a55f31a8d3dc954ffe164","scripts":{"test":"mocha testing/index.test.js","docker":"./dev/build && ./dev/run || true","publish":"./dev/publish"},"_npmUser":{"name":"owenallenaz","email":"owenallenaz@gmail.com"},"repository":{"url":"git+https://github.com/simpleviewinc/sv-npm-promiselib.git","type":"git"},"_npmVersion":"5.6.0","description":"Promise utilities","directories":{},"_nodeVersion":"8.11.3","_hasShrinkwrap":false,"devDependencies":{"mocha":"5.2.0"},"_npmOperationalInternal":{"tmp":"tmp/promiselib_1.0.1_1577991927929_0.19140146035049366","host":"s3://npm-registry-packages"}}},"time":{"created":"2020-01-02T19:05:27.752Z","modified":"2025-10-16T19:54:59.703Z","1.0.1":"2020-01-02T19:05:28.069Z"},"bugs":{"url":"https://github.com/simpleviewinc/sv-npm-promiselib/issues"},"author":{"name":"owenallenaz@gmail.com"},"license":"ISC","homepage":"https://github.com/simpleviewinc/sv-npm-promiselib#readme","repository":{"url":"git+https://github.com/simpleviewinc/sv-npm-promiselib.git","type":"git"},"description":"Promise utilities","maintainers":[{"email":"owenallenaz@gmail.com","name":"owenallenaz"},{"email":"gotshogi@gmail.com","name":"qman33"},{"email":"jmoor@simpleviewinc.com","name":"svjoshua"},{"email":"george.batt@simpleviewinc.com","name":"georgeyb-sv"},{"email":"mike@formativewebsolutions.com","name":"mkes99"},{"email":"colin.booen@simpleviewinc.com","name":"colin.booen"},{"email":"sean.smith@simpleviewinc.com","name":"ssmith_sv"},{"email":"aglazebrook@simpleviewinc.com","name":"aglazebrook"},{"email":"rmaynes@simpleviewinc.com","name":"rmaynes"},{"email":"Michael.Harrington@simpleviewinc.com","name":"mikesan789"},{"email":"Kristian.Gonzalez@simpleviewinc.com","name":"kristian.gonzalez"},{"email":"paul.riding@simpleviewinc.com","name":"paul.riding"},{"email":"amir.muntasser@simpleviewinc.com","name":"arkmuntasser"},{"email":"ed.downard@simpleviewinc.com","name":"actionawesome"},{"email":"mcutshall0@gmail.com","name":"mcutshall"},{"email":"mikael.ramirez@simpleviewinc.com","name":"sv-mikael"},{"email":"kory.chinn@simpleviewinc.com","name":"korychinn_sv"},{"email":"dan-npmjs@dlford.io","name":"dlford"},{"email":"s.loutrel@gmail.com","name":"sloutrel"}],"readme":"[![Build Status](https://travis-ci.org/simpleviewinc/sv-npm-promiselib.svg?branch=master)](https://travis-ci.org/simpleviewinc/sv-npm-promiselib)\n\n# @simpleview/promiselib\nPromise utilities\n\n## Getting Started\n\n```\nnpm install @simpleview/promiselib\n```\n\n```js\nconst promiseLib = require(\"@simpleview/promiselib\");\n```\n\n## API\n\n### promisifyCached\n\n`promisifyCached` provides caching micro-optimizations in cases when you execute `util.promisify` the same method many times. In example, calling it for each instance of an object is very expensive, and this eliminates the expense.\n\nYou use this method exactly like you would use Node's `util.promisify()`.\n\n* fn - `function` - The function you want to promisify.\n\n```js\nvar cbFunction = function(cb) { return cb(null, \"someValue\"); }\nvar promisified = promiseLib.promisifyCached(cbFunction);\n```\n\n### promisifyMethods\n\n`promisifyMethods` is used for creating a `.promises` object which contains promisifed variants of methods on the normal prototype.\n\n* object instance - `object` - The object which contains the methods and will be used for scope.\n* methods - `array` of `string` - Array of method names to promisify.\n\nIn the following block each instance of `MyClass` will have `this.promises.methodA` and `this.promises.methodB` and both to the context of their specific instances.\n\n```js\nvar MyClass = function() {\n\tthis.promises = promiseLib.promisifyMethods(this, [\"methodA\", \"methodB\"]);\n};\nMyClass.prototype.methodA = function(cb) {};\nMyClass.prototype.methodB = function(cb) {};\n```","readmeFilename":"README.md"}