{"_id":"promisify-any","_rev":"19-74b8072818c93aace7b44beb89f2496d","name":"promisify-any","description":"Promisify any of: callback function, sync function, generator function, promise-returning function","dist-tags":{"latest":"2.0.1"},"versions":{"0.0.1":{"name":"promisify-any","version":"0.0.1","description":"Promisify any of: callback function, sync function, generator function, promise-returning function","main":"./lib/","author":{"name":"Overlook Motel"},"repository":{"type":"git","url":"https://github.com/overlookmotel/promisify-any.git"},"bugs":{"url":"https://github.com/overlookmotel/promisify-any/issues"},"dependencies":{"bluebird":"^2.9.25","co":"^4.5.4","generator-supported":"0.0.1","is-generator":"1.0.0"},"devDependencies":{"mocha":"^2.2.4","chai":"^2.3.0","jshint":"^2.7.0"},"keywords":["promise","promisify","any","callback","generator","sync","async"],"scripts":{"test":"make test","test-harmony":"make test-harmony"},"engines":{"node":">=0.10.0"},"licenses":[{"type":"MIT","url":"http://github.com/overlookmotel/promisify-any/raw/master/License"}],"gitHead":"71a121483d1b88fb1a95966de340f21a50e370b5","homepage":"https://github.com/overlookmotel/promisify-any","_id":"promisify-any@0.0.1","_shasum":"fd538d920790318682ab3d7102e1afbf99418ba5","_from":".","_npmVersion":"2.7.4","_nodeVersion":"0.12.2","_npmUser":{"name":"overlookmotel","email":"theoverlookmotel@gmail.com"},"maintainers":[{"name":"overlookmotel","email":"theoverlookmotel@gmail.com"}],"dist":{"shasum":"fd538d920790318682ab3d7102e1afbf99418ba5","tarball":"https://registry.npmjs.org/promisify-any/-/promisify-any-0.0.1.tgz","integrity":"sha512-KUHysH3Q1VFwrGI1uk94TJZQZTW4WkWIcVtUUJ5uskSE8AdNaRteozNCJoYFm3bggFC2qrgXyOneQqtX3pwXww==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEdpCOmQlTBVK1HjU+ay65DtdCtb+lIQHqYy6yQ+Umd7AiBmWUtb1coUerpTk2GllOIKf9GsxvmKWWEkxfdT2nBZ5w=="}]}},"0.0.2":{"name":"promisify-any","version":"0.0.2","description":"Promisify any of: callback function, sync function, generator function, promise-returning function","main":"./lib/","author":{"name":"Overlook Motel"},"repository":{"type":"git","url":"https://github.com/overlookmotel/promisify-any.git"},"bugs":{"url":"https://github.com/overlookmotel/promisify-any/issues"},"dependencies":{"bluebird":"^2.9.25","co":"^4.5.4","generator-supported":"0.0.1","is-generator":"1.0.0"},"devDependencies":{"mocha":"^2.2.4","chai":"^2.3.0","jshint":"^2.7.0"},"keywords":["promise","promisify","any","callback","generator","sync","async"],"scripts":{"test":"make test","test-harmony":"make test-harmony"},"engines":{"node":">=0.10.0"},"licenses":[{"type":"MIT","url":"http://github.com/overlookmotel/promisify-any/raw/master/License"}],"gitHead":"016b7aac283fcdf7eb8a7ee632a2fbdd31dbac5d","homepage":"https://github.com/overlookmotel/promisify-any","_id":"promisify-any@0.0.2","_shasum":"941941d3a9b78a6e63ae37f214c95c8ac08451d4","_from":".","_npmVersion":"2.7.4","_nodeVersion":"0.12.2","_npmUser":{"name":"overlookmotel","email":"theoverlookmotel@gmail.com"},"maintainers":[{"name":"overlookmotel","email":"theoverlookmotel@gmail.com"}],"dist":{"shasum":"941941d3a9b78a6e63ae37f214c95c8ac08451d4","tarball":"https://registry.npmjs.org/promisify-any/-/promisify-any-0.0.2.tgz","integrity":"sha512-PvJm0WLMdYObtT5902glEtmzTON0gsa/xNn1dYCz/QrG5rqrAhFsxlkYKN296QEYlX1/0N72K3bwiOdqQ77xUA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDkY6RIaIEsBL3wCcdfBleJTsUG4G8SkJFe8fQB7hHijgIhAIl0V/U3juAJVDUVm6y+UaYxBeqkbRdisa69ZBtkzUGb"}]}},"0.0.3":{"name":"promisify-any","version":"0.0.3","description":"Promisify any of: callback function, sync function, generator function, promise-returning function","main":"./lib/","author":{"name":"Overlook Motel"},"repository":{"type":"git","url":"https://github.com/overlookmotel/promisify-any.git"},"bugs":{"url":"https://github.com/overlookmotel/promisify-any/issues"},"dependencies":{"bluebird":"^2.9.25","co":"^4.5.4","generator-supported":"0.0.1","is-generator":"1.0.0"},"devDependencies":{"mocha":"^2.2.4","chai":"^2.3.0","jshint":"^2.7.0","istanbul":"^0.3.14","coveralls":"^2.11.2"},"keywords":["promise","promisify","any","callback","generator","sync","async"],"scripts":{"test":"make test","test-harmony":"make test-harmony","cover":"make cover"},"engines":{"node":">=0.10.0"},"licenses":[{"type":"MIT","url":"http://github.com/overlookmotel/promisify-any/raw/master/License"}],"gitHead":"f6e300c197146a961b7f26ef0054b04067e5c32e","homepage":"https://github.com/overlookmotel/promisify-any","_id":"promisify-any@0.0.3","_shasum":"cd22d219094b7278013c4d810b5317b2174a40e5","_from":".","_npmVersion":"2.7.4","_nodeVersion":"0.12.2","_npmUser":{"name":"overlookmotel","email":"theoverlookmotel@gmail.com"},"maintainers":[{"name":"overlookmotel","email":"theoverlookmotel@gmail.com"}],"dist":{"shasum":"cd22d219094b7278013c4d810b5317b2174a40e5","tarball":"https://registry.npmjs.org/promisify-any/-/promisify-any-0.0.3.tgz","integrity":"sha512-Bl2yYCT8MpW7ZMUO1PAVMv90kabn9CRGnE2IOcdC9We82EJjmaGvbbMlV6YSexq/qeLJaGLHLwV3MTzjuYxwwA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCbE9aKba5z0HYiiICc5JxqF/oWNSoCFmZLw3AKBXE1eAIhAI3vm6CEO45XUheTYX6tqkRC+POCNhiYNxStSM1kPK78"}]}},"0.0.4":{"name":"promisify-any","version":"0.0.4","description":"Promisify any of: callback function, sync function, generator function, promise-returning function","main":"./lib/","author":{"name":"Overlook Motel"},"repository":{"type":"git","url":"https://github.com/overlookmotel/promisify-any.git"},"bugs":{"url":"https://github.com/overlookmotel/promisify-any/issues"},"dependencies":{"bluebird":"^2.9.25","co":"^4.5.4","generator-supported":"0.0.1","is-generator":"1.0.0"},"devDependencies":{"mocha":"^2.2.4","chai":"^2.3.0","jshint":"^2.7.0","istanbul":"^0.3.14","coveralls":"^2.11.2"},"keywords":["promise","promisify","any","callback","generator","sync","async"],"scripts":{"test":"make test","test-harmony":"make test-harmony","cover":"make cover"},"engines":{"node":">=0.10.0"},"licenses":[{"type":"MIT","url":"http://github.com/overlookmotel/promisify-any/raw/master/License"}],"gitHead":"5e93dd9245d71010cccc6de64f24702721a2f181","homepage":"https://github.com/overlookmotel/promisify-any","_id":"promisify-any@0.0.4","_shasum":"c62d5d7f53c2c99560786cadb2654b0b1c3b3935","_from":".","_npmVersion":"2.7.4","_nodeVersion":"0.12.2","_npmUser":{"name":"overlookmotel","email":"theoverlookmotel@gmail.com"},"maintainers":[{"name":"overlookmotel","email":"theoverlookmotel@gmail.com"}],"dist":{"shasum":"c62d5d7f53c2c99560786cadb2654b0b1c3b3935","tarball":"https://registry.npmjs.org/promisify-any/-/promisify-any-0.0.4.tgz","integrity":"sha512-Ap3Jv2j2Q+v5EgvGwHwHnJ98KzMhNYgMRd1A42TqxK+esZqM4AKE2DDU9z6YrbQjkppgw9LvuGQmjLtjDbXOfw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG9cs9Htz2T/W2gM1V5aveIge17DH5VKapMNyvpc+gc7AiBN43kfz9lPPuywF+ZKqGaFHUEvbyiqYAuqKi3uvgyWTA=="}]}},"0.0.5":{"name":"promisify-any","version":"0.0.5","description":"Promisify any of: callback function, sync function, generator function, promise-returning function","main":"./lib/","author":{"name":"Overlook Motel"},"repository":{"type":"git","url":"https://github.com/overlookmotel/promisify-any.git"},"bugs":{"url":"https://github.com/overlookmotel/promisify-any/issues"},"dependencies":{"bluebird":"^2.9.25","co":"^4.5.4","generator-supported":"0.0.1","is-generator":"1.0.0"},"devDependencies":{"mocha":"^2.2.4","chai":"^2.3.0","jshint":"^2.7.0","istanbul":"^0.3.14","coveralls":"^2.11.2"},"keywords":["promise","promisify","any","callback","generator","sync","async"],"scripts":{"test":"make test","test-harmony":"make test-harmony","cover":"make cover"},"engines":{"node":">=0.10.0"},"licenses":[{"type":"MIT","url":"http://github.com/overlookmotel/promisify-any/raw/master/License"}],"gitHead":"155ad0f8bb45d1728d98282f97c850879cba0495","homepage":"https://github.com/overlookmotel/promisify-any","_id":"promisify-any@0.0.5","_shasum":"65fd3050fdf07b8b14063154e6fa8dd8375a99ed","_from":".","_npmVersion":"2.7.4","_nodeVersion":"0.12.2","_npmUser":{"name":"overlookmotel","email":"theoverlookmotel@gmail.com"},"maintainers":[{"name":"overlookmotel","email":"theoverlookmotel@gmail.com"}],"dist":{"shasum":"65fd3050fdf07b8b14063154e6fa8dd8375a99ed","tarball":"https://registry.npmjs.org/promisify-any/-/promisify-any-0.0.5.tgz","integrity":"sha512-o1y4qGhin9sdaS6zhKIKzazk4Z4Jr/lALarv98tdO2Aqs0JPzqmhUUch/jIE5FBPgGX0CXkDtsmbpGLLopGDLQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC2++BOEFrgbX6j4BYh7W4Kb31jJhIMdxPVjezDknFufgIgWSwf8xF58pSxtpFY1R/lysmfZBNZcBJdWDG6CEIuPRY="}]}},"0.0.6":{"name":"promisify-any","version":"0.0.6","description":"Promisify any of: callback function, sync function, generator function, promise-returning function","main":"./lib/","author":{"name":"Overlook Motel"},"repository":{"type":"git","url":"https://github.com/overlookmotel/promisify-any.git"},"bugs":{"url":"https://github.com/overlookmotel/promisify-any/issues"},"dependencies":{"bluebird":"^2.9.25","co":"^4.5.4","generator-supported":"0.0.1","is-generator":"1.0.0"},"devDependencies":{"mocha":"^2.2.4","chai":"^2.3.0","jshint":"^2.7.0","istanbul":"^0.3.14","coveralls":"^2.11.2"},"keywords":["promise","promisify","any","callback","generator","sync","async"],"scripts":{"test":"make test","test-harmony":"make test-harmony","cover":"make cover"},"engines":{"node":">=0.10.0"},"licenses":[{"type":"MIT","url":"http://github.com/overlookmotel/promisify-any/raw/master/License"}],"gitHead":"fff81825af7e41513da101ab6d2854564ac845b4","homepage":"https://github.com/overlookmotel/promisify-any","_id":"promisify-any@0.0.6","_shasum":"7447365e9c2f413733a4488cc7d62cf7a35df62c","_from":".","_npmVersion":"2.7.4","_nodeVersion":"0.12.2","_npmUser":{"name":"overlookmotel","email":"theoverlookmotel@gmail.com"},"maintainers":[{"name":"overlookmotel","email":"theoverlookmotel@gmail.com"}],"dist":{"shasum":"7447365e9c2f413733a4488cc7d62cf7a35df62c","tarball":"https://registry.npmjs.org/promisify-any/-/promisify-any-0.0.6.tgz","integrity":"sha512-UPBVEoeJBRIw2Gy4J4zVI+7eH3iSI7x8tkQD/xBYQw/nDtm6O0czW8EQb0lgfL0/0pojU1d0TXNhdZcko6VbXg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDDjsLGmOHeeWeV7PwHTGPj7flqZniBuVRaIX126Fu3rAIhANdYbToMrbKCxm+4Q7U0xBD58mxEqkq+aaOovomvq2WM"}]}},"0.1.0":{"name":"promisify-any","version":"0.1.0","description":"Promisify any of: callback function, sync function, generator function, promise-returning function","main":"./lib/","author":{"name":"Overlook Motel"},"repository":{"type":"git","url":"https://github.com/overlookmotel/promisify-any.git"},"bugs":{"url":"https://github.com/overlookmotel/promisify-any/issues"},"dependencies":{"bluebird":"^2.9.25","co-bluebird":"0.0.2","is-generator":"1.0.0"},"devDependencies":{"generator-supported":"0.0.1","mocha":"^2.2.4","chai":"^2.3.0","jshint":"^2.7.0","istanbul":"^0.3.14","coveralls":"^2.11.2"},"keywords":["promise","promisify","any","callback","generator","sync","async"],"scripts":{"test":"make test","test-harmony":"make test-harmony","cover":"make cover"},"engines":{"node":">=0.10.0"},"licenses":[{"type":"MIT","url":"http://github.com/overlookmotel/promisify-any/raw/master/License"}],"gitHead":"82457c5dc0ebe7a3e42683b6dd06c6d9388612a1","homepage":"https://github.com/overlookmotel/promisify-any","_id":"promisify-any@0.1.0","_shasum":"474698f176703407a95f2c90e5557af310878887","_from":".","_npmVersion":"2.11.2","_nodeVersion":"0.12.5","_npmUser":{"name":"overlookmotel","email":"theoverlookmotel@gmail.com"},"maintainers":[{"name":"overlookmotel","email":"theoverlookmotel@gmail.com"}],"dist":{"shasum":"474698f176703407a95f2c90e5557af310878887","tarball":"https://registry.npmjs.org/promisify-any/-/promisify-any-0.1.0.tgz","integrity":"sha512-ZM3COAErixqvRGiqn0TC5Ynv4JufBji6fPZPe4/xYFxZ7/gc2+6Vv8zCuVDg95DqR2A3ZhPIF3jcIhJXa/VqEg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDS2ntz1iAnT1JF/7lSxnq1QV2J0JDD6aHxDRlU6NCH3QIhAKL3KfN02Y/dbP8I0if4TmX1sSmc561ENOTuNrwSCAqW"}]}},"1.0.0":{"name":"promisify-any","version":"1.0.0","description":"Promisify any of: callback function, sync function, generator function, promise-returning function","main":"./lib/","author":{"name":"Overlook Motel"},"repository":{"type":"git","url":"https://github.com/overlookmotel/promisify-any.git"},"bugs":{"url":"https://github.com/overlookmotel/promisify-any/issues"},"dependencies":{"bluebird":"^2.9.25","co-bluebird":"0.0.2","is-generator":"1.0.0"},"devDependencies":{"generator-supported":"0.0.1","mocha":"^2.2.4","chai":"^2.3.0","jshint":"^2.7.0","istanbul":"^0.3.14","coveralls":"^2.11.2"},"keywords":["promise","promisify","any","callback","generator","sync","async"],"scripts":{"test":"make test","test-harmony":"make test-harmony","cover":"make cover"},"engines":{"node":">=0.10.0"},"licenses":[{"type":"MIT","url":"http://github.com/overlookmotel/promisify-any/raw/master/License"}],"gitHead":"837624a906761c414bbfd92d9860f05d27629098","homepage":"https://github.com/overlookmotel/promisify-any","_id":"promisify-any@1.0.0","_shasum":"e65ec9ab6a86e2a7c80bc259efbb580f49390152","_from":".","_npmVersion":"2.11.2","_nodeVersion":"0.12.5","_npmUser":{"name":"overlookmotel","email":"theoverlookmotel@gmail.com"},"maintainers":[{"name":"overlookmotel","email":"theoverlookmotel@gmail.com"}],"dist":{"shasum":"e65ec9ab6a86e2a7c80bc259efbb580f49390152","tarball":"https://registry.npmjs.org/promisify-any/-/promisify-any-1.0.0.tgz","integrity":"sha512-rshHHe/28xMEV1AkK9OapbkYFEpVF5FkkJI4inVB0hI3f3b7kMJ4r9srOhxG/z0wZivs1IN0cwT3MRWh0jYM8Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCpR7S1UCREs0IkWpcm4oJpeRm7vB0vuuPuC5BpJI6yIQIhAJUV0Rt9ueqLE+18wvotw7FsXwV6E0tPNQSiyMzt1fCW"}]}},"1.0.1":{"name":"promisify-any","version":"1.0.1","description":"Promisify any of: callback function, sync function, generator function, promise-returning function","main":"./lib/","author":{"name":"Overlook Motel"},"repository":{"type":"git","url":"https://github.com/overlookmotel/promisify-any.git"},"bugs":{"url":"https://github.com/overlookmotel/promisify-any/issues"},"dependencies":{"bluebird":"^2.9.32","co-bluebird":"^0.1.0","is-generator":"1.0.0"},"devDependencies":{"generator-supported":"0.0.1","mocha":"^2.2.4","chai":"^2.3.0","jshint":"^2.7.0","istanbul":"^0.3.14","coveralls":"^2.11.2"},"keywords":["promise","promisify","any","callback","generator","sync","async"],"scripts":{"test":"make test","test-harmony":"make test-harmony","cover":"make cover"},"engines":{"node":">=0.10.0"},"licenses":[{"type":"MIT","url":"http://github.com/overlookmotel/promisify-any/raw/master/License"}],"gitHead":"f0fc2903364c170e639640946b4326f07e468b89","homepage":"https://github.com/overlookmotel/promisify-any","_id":"promisify-any@1.0.1","_shasum":"c2cbba770d4ce8381105ba525b8071093c9e55d5","_from":".","_npmVersion":"2.11.2","_nodeVersion":"0.12.5","_npmUser":{"name":"overlookmotel","email":"theoverlookmotel@gmail.com"},"maintainers":[{"name":"overlookmotel","email":"theoverlookmotel@gmail.com"}],"dist":{"shasum":"c2cbba770d4ce8381105ba525b8071093c9e55d5","tarball":"https://registry.npmjs.org/promisify-any/-/promisify-any-1.0.1.tgz","integrity":"sha512-3ai5P3jHcxI6POK3VeiK2RxOX0RevEunjxljt35VY/VPlar0Ew+TDJiey8W9fin+ArTG4jtb6stnG2U0khtYGQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICnIy48lIjXCwzUCJgrYCWGVsE8jS/eBvdHll51za6/6AiEAiIR6KXF1q9p9Q1FxAGXwOa6UrVHp7QN50qK34A2C8hM="}]}},"1.1.0":{"name":"promisify-any","version":"1.1.0","description":"Promisify any of: callback function, sync function, generator function, promise-returning function","main":"./lib/","author":{"name":"Overlook Motel"},"repository":{"type":"git","url":"https://github.com/overlookmotel/promisify-any.git"},"bugs":{"url":"https://github.com/overlookmotel/promisify-any/issues"},"dependencies":{"bluebird":"^2.9.32","co-bluebird":"^0.1.0","is-generator":"1.0.0"},"devDependencies":{"generator-supported":"0.0.1","mocha":"^2.2.4","chai":"^2.3.0","jshint":"^2.7.0","istanbul":"^0.3.14","coveralls":"^2.11.2"},"keywords":["promise","promisify","any","callback","generator","sync","async"],"scripts":{"test":"make test","test-harmony":"make test-harmony","cover":"make cover"},"engines":{"node":">=0.10.0"},"licenses":[{"type":"MIT","url":"http://github.com/overlookmotel/promisify-any/raw/master/License"}],"gitHead":"9d6cdbea74b1d020f1bca301010af77f0003dd1f","homepage":"https://github.com/overlookmotel/promisify-any","_id":"promisify-any@1.1.0","_shasum":"26b29cbbfe08f48c00ed8968b5b6f17d73f14d58","_from":".","_npmVersion":"2.11.3","_nodeVersion":"0.12.7","_npmUser":{"name":"overlookmotel","email":"theoverlookmotel@gmail.com"},"maintainers":[{"name":"overlookmotel","email":"theoverlookmotel@gmail.com"}],"dist":{"shasum":"26b29cbbfe08f48c00ed8968b5b6f17d73f14d58","tarball":"https://registry.npmjs.org/promisify-any/-/promisify-any-1.1.0.tgz","integrity":"sha512-iqjfcu+Sg3t9VxES71rn60+tkl/0Bk/OsAtr/sFtJWWbzsjXX2W93GIU9R5r4WmKBnyiqY/AnoQGO0cPWRHkxg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDU23QmLTKCcqEX88z5fOkJeJVb19qtd+Jo+BnrcyhsJwIhAI3Mw4S0d6E3KWYpJoUKUgYPBwH8SYI3JWeM8bj6zD4F"}]}},"1.1.1":{"name":"promisify-any","version":"1.1.1","description":"Promisify any of: callback function, sync function, generator function, promise-returning function","main":"./lib/","author":{"name":"Overlook Motel"},"repository":{"type":"git","url":"https://github.com/overlookmotel/promisify-any.git"},"bugs":{"url":"https://github.com/overlookmotel/promisify-any/issues"},"dependencies":{"bluebird":"^2.9.32","co-bluebird":"^0.1.0","is-generator":"^1.0.2"},"devDependencies":{"generator-supported":"0.0.1","mocha":"^2.2.4","chai":"^2.3.0","jshint":"^2.7.0","istanbul":"^0.3.14","coveralls":"^2.11.2"},"keywords":["promise","promisify","any","callback","generator","sync","async"],"scripts":{"test":"make test","test-harmony":"make test-harmony","cover":"make cover"},"engines":{"node":">=0.10.0"},"licenses":[{"type":"MIT","url":"http://github.com/overlookmotel/promisify-any/raw/master/License"}],"gitHead":"e85499ccdf2f4473f973fa7f3631b45076806566","homepage":"https://github.com/overlookmotel/promisify-any","_id":"promisify-any@1.1.1","_shasum":"36aa2cc3fe748ea21b399cadc4485b8f025cfd39","_from":".","_npmVersion":"2.11.3","_nodeVersion":"0.12.7","_npmUser":{"name":"overlookmotel","email":"theoverlookmotel@gmail.com"},"maintainers":[{"name":"overlookmotel","email":"theoverlookmotel@gmail.com"}],"dist":{"shasum":"36aa2cc3fe748ea21b399cadc4485b8f025cfd39","tarball":"https://registry.npmjs.org/promisify-any/-/promisify-any-1.1.1.tgz","integrity":"sha512-UzUkmAhy26p59Kf0MAv9JjFF7v26CV2K3eLxaQ4w4iKUyhTORGZJHuvVjGZrIAjBPNwXiwHatLUtuCZ+ruv0GA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDyFW4mocefoHO1IwcJ3e+h2yOjkug83w4YQLLPP+aAKAiAXOUDpz8Cr2vWkjSAO2qOFxdxP0YdaLpDzniTOFgh9eg=="}]}},"1.2.0":{"name":"promisify-any","version":"1.2.0","description":"Promisify any of: callback function, sync function, generator function, promise-returning function","main":"./lib/","author":{"name":"Overlook Motel"},"repository":{"type":"git","url":"https://github.com/overlookmotel/promisify-any.git"},"bugs":{"url":"https://github.com/overlookmotel/promisify-any/issues"},"dependencies":{"bluebird":"^2.10.0","co-bluebird":"^1.0.1","is-generator":"^1.0.2"},"devDependencies":{"generator-supported":"0.0.1","mocha":"^2.3.2","chai":"^3.2.0","jshint":"^2.8.0","istanbul":"^0.3.19","coveralls":"^2.11.4"},"keywords":["promise","promisify","any","callback","generator","sync","async"],"scripts":{"test":"make test","test-harmony":"make test-harmony","cover":"make cover"},"engines":{"node":">=0.10.0"},"licenses":[{"type":"MIT","url":"http://github.com/overlookmotel/promisify-any/raw/master/License"}],"gitHead":"16ef7d8cc60bce7d2871bd59e3878b4d0cc38499","homepage":"https://github.com/overlookmotel/promisify-any","_id":"promisify-any@1.2.0","_shasum":"3dc09023a867fca83bc5e7255f9c3a34472c17f7","_from":".","_npmVersion":"2.11.3","_nodeVersion":"0.12.7","_npmUser":{"name":"overlookmotel","email":"theoverlookmotel@gmail.com"},"maintainers":[{"name":"overlookmotel","email":"theoverlookmotel@gmail.com"}],"dist":{"shasum":"3dc09023a867fca83bc5e7255f9c3a34472c17f7","tarball":"https://registry.npmjs.org/promisify-any/-/promisify-any-1.2.0.tgz","integrity":"sha512-0vvnm84m5lrSUV3uQ4xcPKhe2NCsfjtevI1ofgXDej+CCZBQCJBS6pfUa1o7JkvM9DUreKQeu6B3ogbk7nV/jg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBSqBKoMSlyweiuKXpDI67+zHDJmJNYp03dL3zy7V4sLAiEA5e7HaxgAP3eXxWeNVB3yix/woE2gYUMRs0M7F7oukVA="}]}},"1.2.1":{"name":"promisify-any","version":"1.2.1","description":"Promisify any of: callback function, sync function, generator function, promise-returning function","main":"./lib/","author":{"name":"Overlook Motel"},"repository":{"type":"git","url":"https://github.com/overlookmotel/promisify-any.git"},"bugs":{"url":"https://github.com/overlookmotel/promisify-any/issues"},"dependencies":{"bluebird":"^2.10.0","co-bluebird":"^1.1.0","is-generator":"^1.0.2"},"devDependencies":{"generator-supported":"0.0.1","mocha":"^2.3.2","chai":"^3.2.0","jshint":"^2.8.0","istanbul":"^0.3.19","coveralls":"^2.11.4"},"keywords":["promise","promisify","any","callback","generator","sync","async"],"scripts":{"test":"make test","test-harmony":"make test-harmony","cover":"make cover"},"engines":{"node":">=0.10.0"},"licenses":[{"type":"MIT","url":"http://github.com/overlookmotel/promisify-any/raw/master/License"}],"gitHead":"b279c9650dc5aa4ebf9b49c06a86d7834d32c6da","homepage":"https://github.com/overlookmotel/promisify-any","_id":"promisify-any@1.2.1","_shasum":"b26c237ed465efae8993dd13a8019985f6d4a74e","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"overlookmotel","email":"theoverlookmotel@gmail.com"},"maintainers":[{"name":"overlookmotel","email":"theoverlookmotel@gmail.com"}],"dist":{"shasum":"b26c237ed465efae8993dd13a8019985f6d4a74e","tarball":"https://registry.npmjs.org/promisify-any/-/promisify-any-1.2.1.tgz","integrity":"sha512-CtLBo9wNAU5tYf4Lx6Mb8F6XT0gDRAAumDRm5hDCTQqGvRfNSVYq11f1qluSdNpj8btiClSbtKo44uVSaRoo0A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDRa30k8Vcr3k2PHSU7tnzbmK/MoRliRKcc8dqR8uqZ6AiAziBD2Zt0vSJPmPreVSMHuBwUxxHw2mSQoOImQNBPfsg=="}]}},"2.0.0":{"name":"promisify-any","version":"2.0.0","description":"Promisify any of: callback function, sync function, generator function, promise-returning function","main":"./lib/","author":{"name":"Overlook Motel"},"repository":{"type":"git","url":"https://github.com/overlookmotel/promisify-any.git"},"bugs":{"url":"https://github.com/overlookmotel/promisify-any/issues"},"dependencies":{"bluebird":"^2.10.0","co-bluebird":"^1.1.0","is-generator":"^1.0.2"},"devDependencies":{"generator-supported":"0.0.1","mocha":"^2.3.2","chai":"^3.2.0","jshint":"^2.8.0","istanbul":"^0.3.19","coveralls":"^2.11.4"},"keywords":["promise","promisify","any","callback","generator","sync","async"],"scripts":{"test":"make test","test-harmony":"make test-harmony","cover":"make cover"},"engines":{"node":">=0.10.0"},"licenses":[{"type":"MIT","url":"http://github.com/overlookmotel/promisify-any/raw/master/License"}],"gitHead":"5d8d5743d9083881d28d3fdd342c6dda09a87eb6","homepage":"https://github.com/overlookmotel/promisify-any","_id":"promisify-any@2.0.0","_shasum":"387560acc82e0c28e6aa6e33b97eef7d550324c4","_from":".","_npmVersion":"2.11.3","_nodeVersion":"0.12.7","_npmUser":{"name":"overlookmotel","email":"theoverlookmotel@gmail.com"},"maintainers":[{"name":"overlookmotel","email":"theoverlookmotel@gmail.com"}],"dist":{"shasum":"387560acc82e0c28e6aa6e33b97eef7d550324c4","tarball":"https://registry.npmjs.org/promisify-any/-/promisify-any-2.0.0.tgz","integrity":"sha512-y8DbaECJOHNJQoUIJd6uIS4ztSev5RfHZfv5WdLcU+WxKYVSxaNZyaqvAl9JGCrXKICMztanvTpzi13u1ICgMg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDnvBALj5MV8YSkjjaNEmQf+y6bprePAcLYjAp4N0JN1AIgGox4re3TgSR+xcGhUx8X5aYsRO+OOoWeWwXjOwSW1qA="}]}},"2.0.1":{"name":"promisify-any","version":"2.0.1","description":"Promisify any of: callback function, sync function, generator function, promise-returning function","main":"./lib/","author":{"name":"Overlook Motel"},"repository":{"type":"git","url":"https://github.com/overlookmotel/promisify-any.git"},"bugs":{"url":"https://github.com/overlookmotel/promisify-any/issues"},"dependencies":{"bluebird":"^2.10.0","co-bluebird":"^1.1.0","is-generator":"^1.0.2"},"devDependencies":{"generator-supported":"0.0.1","mocha":"^2.3.2","chai":"^3.2.0","jshint":"^2.8.0","istanbul":"^0.3.19","coveralls":"^2.11.4"},"keywords":["promise","promisify","any","callback","generator","sync","async"],"scripts":{"test":"make test","test-harmony":"make test-harmony","cover":"make cover"},"engines":{"node":">=0.10.0"},"licenses":[{"type":"MIT","url":"http://github.com/overlookmotel/promisify-any/raw/master/License"}],"gitHead":"f6447d6f143e8d6a0aa9dd71447f885b5d715904","homepage":"https://github.com/overlookmotel/promisify-any","_id":"promisify-any@2.0.1","_shasum":"403e00a8813f175242ab50fe33a69f8eece47305","_from":".","_npmVersion":"2.11.3","_nodeVersion":"0.12.7","_npmUser":{"name":"overlookmotel","email":"theoverlookmotel@gmail.com"},"maintainers":[{"name":"overlookmotel","email":"theoverlookmotel@gmail.com"}],"dist":{"shasum":"403e00a8813f175242ab50fe33a69f8eece47305","tarball":"https://registry.npmjs.org/promisify-any/-/promisify-any-2.0.1.tgz","integrity":"sha512-pVaGouFbTVxqpVJ+T5A15olNJDASAZHYq5cXz6mWdr6/X34mVWiG9MSdzHTcVBCv4aqBP7wGspi7BUSRbEmhsw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD+wiTN1DEC4M7hfI9mA1CDEHetYitEo429xqGSI1KPGgIgMDSdffVAu3tLWFsfjhiwZ1+HdTOELA+ovQOMHx6Gm8c="}]}}},"readme":"# promisify-any.js\n\n# Promisify any of: callback function, sync function, generator function, promise-returning function\n\n## Current status\n\n[![NPM version](https://img.shields.io/npm/v/promisify-any.svg)](https://www.npmjs.com/package/promisify-any)\n[![Build Status](https://img.shields.io/travis/overlookmotel/promisify-any/master.svg)](http://travis-ci.org/overlookmotel/promisify-any)\n[![Dependency Status](https://img.shields.io/david/overlookmotel/promisify-any.svg)](https://david-dm.org/overlookmotel/promisify-any)\n[![Dev dependency Status](https://img.shields.io/david/dev/overlookmotel/promisify-any.svg)](https://david-dm.org/overlookmotel/promisify-any)\n[![Coverage Status](https://img.shields.io/coveralls/overlookmotel/promisify-any/master.svg)](https://coveralls.io/r/overlookmotel/promisify-any)\n\nAPI is stable and all features are tested.\n\n## What is it for?\n\nThere are plenty of modules for promisifying callback functions. But what if you are writing a module where the user provides a function as an input to your API and you want to give them flexibility to either use promises or callbacks in that function? And what about generator functions?\n\nThis module takes an input which can be any of:\n\n- Async callback function\n- Sync function\n- Promise-returning function\n- Generator function which yields promises\n\n...and turns any of the above into a promise-returning function.\n\n## Usage\n\n### Installation\n\n    npm install promisify-any\n\n### Loading\n\n```js\nvar promisify = require('promisify-any');\n```\n\n### Promisifying\n\nPass the function to be converted to `promisify`.\n\n```js\n\nfn = promisify(fn);\n\n```\n\nThe result of calling `fn` now will be a promise.\n\n```js\nfn().then(function(result) {\n    // ...\n});\n```\n\nIf the function expects arguments, the number of arguments (not including the callback) MUST be provided as a 2nd argument to `promisify`.\n\n```js\nvar fn = function(a, b, cb) {\n    return cb(null, a + b);\n};\n\nfn = promisify(fn, 2);\n```\n\nThis is so that you end up with the same function, with any of the following inputs:\n\n```js\nvar fns = [\n    function(a, b, cb) { return cb(null, a + b); },\n    function(a, b) { return a + b; },\n    function(a, b) { return Promise.resolve(a + b); },\n    function *(a, b) { return yield Promise.resolve(a + b); }\n];\n\nfns = fns.map(function(fn) {return promisify(fn, 2)});\n// fns[0] == fns[1] == fns[2] == fns[3]\n\n```\n\n`promisify-any` works out if an input function uses a callback or not, based on the number of arguments the function has. So it needs to know in advance how many arguments it *should* have!\n\n#### Async callback functions\n\nAsync callback functions are \"promisified\".\n\ne.g. Returning a value through callback:\n\n```js\nvar fn = promisify(function(cb) {\n    setImmediate(function() {\n        cb(null, 123);\n    });\n});\n\nfn().then(function(result) {\n    // result = 123\n});\n```\n\ne.g. Taking arguments (note that number of expected arguments is passed to `promisify`):\n\n```js\nvar fn = promisify(function(x, y, cb) {\n    setImmediate(function() {\n        cb(null, x + y);\n    });\n}, 2);\n\nfn(3, 4).then(function(result) {\n    // result = 7\n});\n```\n\ne.g. Returning an error through callback:\n\n```js\nvar fn = promisify(function(cb) {\n    setImmediate(function() {\n        cb(new Error('oops!'));\n    });\n});\n\nfn().catch(function(err) {\n    // err.message = 'oops!'\n});\n```\n\n#### Sync functions\n\nSync functions are turned into asynchronous promise-returning functions:\n\n```js\nvar fn = promisify(function(x, y) {\n    return x + y;\n}, 2);\n\nfn(3, 4).then(function(result) {\n    // result = 7\n});\n```\n\n```js\nvar fn = promisify(function() {\n    throw new Error('oops!');\n});\n\nfn().catch(function(err) {\n    // err.message = 'oops!'\n});\n```\n\n#### Promise-returning functions\n\nPromise-returning functions are left unchanged.\n\n```js\nvar fn = promisify(function(x, y) {\n    return Promise.resolve(x + y);\n}, 2);\n\nfn(3, 4).then(function(result) {\n    // result = 7\n});\n```\n\n#### Generator functions\n\nGenerator functions are wrapped using [co](https://www.npmjs.com/package/co) (`co.wrap()`) so that they can yield promises. The resulting function also returns a promise.\n\n```js\nvar fn = promisify(function *(x, y) {\n    var values = yield [\n        Promise.resolve(x * 10),\n        Promise.resolve(y * 10)\n    ];\n\n    return values[0] + values[1];\n}, 2);\n\nfn(3, 4).then(function(result) {\n    // result = 70\n});\n```\n\nNB Generators are only supported in node v0.11 upwards and require node to be run with the `--harmony` flag.\n\n#### Mixing sync and promise returns\n\nIn this example, a user is loaded from the database, but records are cached in a local variable, and the cached version is used first if it exists. The function may do any of:\n\n* return a promise that is asynchronously resolved\n* return a promise that is asynchronously rejected\n* return a result synchronously (from the cache)\n* throw synchronously\n\n```js\nvar cache = [];\nfunction getUserFromDb(id) {\n    if (!id) throw new Error('Must provide id');\n\n    if (cache[id]) return cache[id];\n\n    // userModel.find() returns a promise\n    return userModel.find( { where: { id: id } } ).then(function(result) {\n        if (!result) return Promise.reject(new Error('User not found'));\n\n        cache[id] = result;\n        return result;\n    };\n}\n```\n\nThis will not work if the function returns synchronously:\n\n```js\ngetUserFromDb(123).then(function(result) {\n    // do something with the result\n});\n```\n\nBut this will always work:\n\n```js\ngetUserFromDb = promisify(getUserFromDb, 1);\n\ngetUserFromDb(123).then(function(result) {\n    // do something with the result\n});\n```\n\nIt's less cumbersome to write functions in this way - returning/throwing either synchronously or asynchronously.\n\n### `promisify.generators(object)`\n\nPromisifies all methods of the object which are generators.\n\n```js\nvar obj = {\n    addOne: function *(x) {\n        return yield Promise.resolve(x + 1);\n    },\n    double: function *(x) {\n        return yield Promise.resolve(x * 2);\n    }\n};\n\npromisify.generators(obj);\n\nobj.addOne(10).then(obj.double).then(function(result) {\n    // result = 22\n});\n```\n\n### `promisify.use(Promise)`\n\nCreates a new instance of `promisify-any`, which uses the Promise implementation provided.\n\n```js\nvar Bluebird = require('bluebird');\nvar promisify = require('promisify-any').use(Bluebird);\n\n// now use `promisify-any` in the usual way\nvar fn = promisify(function() {});\n\nvar p = fn();\n\nconsole.log(p instanceof Bluebird); // true\n```\n\n## Tests\n\nUse `npm test` to run the tests or `npm run test-harmony` to include generator tests.\nUse `npm run cover` to check coverage.\n\n## Changelog\n\nSee changelog.md\n\n## Issues\n\nIf you discover a bug, please raise an issue on Github. https://github.com/overlookmotel/promisify-any/issues\n\n## Contribution\n\nPull requests are very welcome. Please:\n\n* ensure all tests pass before submitting PR\n* add an entry to changelog\n* add tests for new features\n* document new functionality/API additions in README\n","maintainers":[{"name":"overlookmotel","email":"theoverlookmotel@gmail.com"}],"time":{"modified":"2022-06-24T19:41:50.836Z","created":"2015-05-11T01:07:28.756Z","0.0.1":"2015-05-11T01:07:28.756Z","0.0.2":"2015-05-13T19:49:46.784Z","0.0.3":"2015-05-27T09:09:21.598Z","0.0.4":"2015-06-02T13:30:33.019Z","0.0.5":"2015-06-08T20:56:41.287Z","0.0.6":"2015-06-08T21:27:02.718Z","0.1.0":"2015-06-28T22:32:48.718Z","1.0.0":"2015-07-01T14:05:25.067Z","1.0.1":"2015-07-10T23:18:54.389Z","1.1.0":"2015-07-18T08:51:20.112Z","1.1.1":"2015-07-18T09:00:32.443Z","1.2.0":"2015-09-19T00:19:44.309Z","1.2.1":"2015-09-19T00:52:05.372Z","2.0.0":"2015-09-21T21:04:56.989Z","2.0.1":"2015-09-21T21:12:02.607Z"},"homepage":"https://github.com/overlookmotel/promisify-any","keywords":["promise","promisify","any","callback","generator","sync","async"],"repository":{"type":"git","url":"https://github.com/overlookmotel/promisify-any.git"},"author":{"name":"Overlook Motel"},"bugs":{"url":"https://github.com/overlookmotel/promisify-any/issues"},"readmeFilename":"README.md","users":{"waynedpj":true,"foxwoods":true}}