{"_id":"promise-nodeify","_rev":"2893343","name":"promise-nodeify","description":"Call a Node-style callback with the resolution value or rejection cause of a Promise without the common pitfalls.","dist-tags":{"latest":"3.0.1"},"maintainers":[{"name":"kevinoid","email":""}],"time":{"modified":"2022-11-30T02:15:03.000Z","created":"2016-04-02T06:02:16.386Z","3.0.1":"2018-08-29T17:49:14.084Z","3.0.0":"2018-06-29T22:31:26.790Z","2.0.0":"2018-01-22T18:25:03.066Z","1.0.1":"2017-05-21T02:22:15.367Z","1.0.0":"2017-02-25T05:13:56.214Z","0.1.0":"2016-04-02T06:02:16.386Z"},"users":{},"author":{"name":"Kevin Locke","email":"kevin@kevinlocke.name"},"repository":{"type":"git","url":"git+https://github.com/kevinoid/promise-nodeify.git"},"versions":{"3.0.1":{"name":"promise-nodeify","version":"3.0.1","description":"Call a Node-style callback with the resolution value or rejection cause of a Promise without the common pitfalls.","keywords":["callback","nodeify","promise"],"license":"MIT","homepage":"https://github.com/kevinoid/promise-nodeify","bugs":{"url":"https://github.com/kevinoid/promise-nodeify/issues"},"author":{"name":"Kevin Locke","email":"kevin@kevinlocke.name"},"repository":{"type":"git","url":"git+https://github.com/kevinoid/promise-nodeify.git"},"main":"index.js","//":"All scripts should run in POSIX sh and Windows cmd.exe","scripts":{"benchmark":"cd benchmark && npm install && node index.js","build":"rimraf dist && gulp","clean":"rimraf coverage && rimraf doc","doc":"npm run doc-js && npm run doc-spec","doc-js":"rimraf doc/api && jsdoc -c jsdoc.conf.json .","doc-spec":"rimraf doc/spec && mkdir doc/spec && mocha --reporter doc --recursive test | nodecat doc-src/spec/header.xhtml - doc-src/spec/footer.xhtml > doc/spec/index.xhtml","lint":"npm run lint-js && npm run lint-doc","lint-doc":"jsdoc -t templates/silent -c jsdoc-lint.conf.json . && echo JSDoc passed.","lint-js":"eslint . && echo ESLint passed.","postpublish":"git -C doc push && git push --follow-tags origin master gh-pages && echo Remember to update GitHub Releases from CHANGELOG.md && echo until skywinder/github-changelog-generator#56 is fixed.","postversion":"rimraf doc && git clone -b gh-pages -l -q . doc && npm run doc && git -C doc add . && git -C doc commit -n -m \"Docs for v$npm_package_version\"","preversion":"check-audit && depcheck --ignores greenkeeper-lockfile --ignore-dirs doc && david && git-branch-is master && travis-status -b master -c -wx && appveyor-status -b master -c -p kevinoid/promise-nodeify -w && istanbul check-coverage --statements 95 coverage/coverage.json","test":"npm run lint && npm run test-unit","test-ci":"npm run test && npm run build","test-ci-cov":"npm run test-cov && npm run build","test-cov":"npm run lint && npm run test-unit-cov","test-unit":"mocha --recursive test","test-unit-cov":"istanbul cover -x test-lib/** _mocha -- --recursive test","upload-cov":"codecov < ./coverage/lcov.info && coveralls < ./coverage/lcov.info","version":"npm run build && git add dist && git commit --allow-empty -n -m \"Distributable files for v$npm_package_version\" && github_changelog_generator -t \"$npm_config_gcg_github_token\" --future-release \"$npm_package_version\" && echo && echo === Please edit CHANGELOG.md as desired, then exit === && echo && $npm_config_shell && git commit -m \"Update CHANGELOG.md for $npm_package_version\" CHANGELOG.md","version-deps":"npm install david depcheck git-branch-is npm-audit-resolver travis-status"},"dependencies":{},"devDependencies":{"@babel/core":"^7.0.0","@babel/plugin-transform-arrow-functions":"^7.0.0","@babel/plugin-transform-block-scoping":"^7.0.0","bluebird":">=1.0.0","codecov":"^3.0.0","coveralls":"^3.0.0","eslint":"^5.0.0","eslint-config-airbnb-base":"^13.1.0","eslint-plugin-import":"^2.14.0","greenkeeper-lockfile":"^1.15.1","gulp":"^3.9.1","gulp-babel":"^8.0.0","gulp-rename":"^1.2.2","gulp-sourcemaps":"^2.6.4","gulp-uglify":"^3.0.0","gulp-umd":"^2.0.0","istanbul":"^0.4.1","jsdoc":"^3.4.1","mocha":"^5.0.0","nodecat":"^2.0.0","promise-finally":"^3.0.0","pump":"^3.0.0","rimraf":"^2.2.0"},"engines":{"node":">=6","npm":">=1.3.7"},"greenkeeper":{"ignore":["eslint"]},"gitHead":"822e4c73f5179342b7348867b2519873bf84790f","_id":"promise-nodeify@3.0.1","_npmVersion":"6.3.0","_nodeVersion":"8.11.2","_npmUser":{"name":"kevinoid","email":"kevin@kevinlocke.name"},"dist":{"shasum":"f0f5d9720ee9ec71dd2bfa92667be504c10229c2","size":10203,"noattachment":false,"key":"/promise-nodeify/-/promise-nodeify-3.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/promise-nodeify/download/promise-nodeify-3.0.1.tgz"},"maintainers":[{"name":"kevinoid","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/promise-nodeify_3.0.1_1535564953955_0.47040569071897"},"_hasShrinkwrap":false,"publish_time":1535564954084,"_cnpm_publish_time":1535564954084,"_cnpmcore_publish_time":"2021-12-16T18:34:00.383Z"},"3.0.0":{"name":"promise-nodeify","version":"3.0.0","description":"Call a Node-style callback with the resolution value or rejection cause of a Promise without the common pitfalls.","keywords":["callback","nodeify","promise"],"license":"MIT","homepage":"https://github.com/kevinoid/promise-nodeify","bugs":{"url":"https://github.com/kevinoid/promise-nodeify/issues"},"author":{"name":"Kevin Locke","email":"kevin@kevinlocke.name"},"repository":{"type":"git","url":"git+https://github.com/kevinoid/promise-nodeify.git"},"main":"index.js","//":"All scripts should run in POSIX sh and Windows cmd.exe","scripts":{"benchmark":"cd benchmark && npm install && node index.js","build":"rimraf dist && gulp","clean":"rimraf coverage && rimraf doc","doc":"npm run doc-js && npm run doc-spec","doc-js":"rimraf doc/api && jsdoc -c jsdoc.conf.json .","doc-spec":"rimraf doc/spec && mkdir doc/spec && mocha --reporter doc --recursive test | nodecat doc-src/spec/header.xhtml - doc-src/spec/footer.xhtml > doc/spec/index.xhtml","lint":"npm run lint-js && npm run lint-doc","lint-doc":"jsdoc -t templates/silent -c jsdoc-lint.conf.json . && echo JSDoc passed.","lint-js":"eslint . && echo ESLint passed.","postpublish":"git -C doc push && git push --follow-tags origin master gh-pages && echo Remember to update GitHub Releases from CHANGELOG.md && echo until skywinder/github-changelog-generator#56 is fixed.","postversion":"rimraf doc && git clone -b gh-pages -l -q . doc && npm run doc && git -C doc add . && git -C doc commit -n -m \"Docs for v$npm_package_version\"","preversion":"depcheck --ignores eslint-plugin-import,greenkeeper-lockfile --ignore-dirs doc && david -i eslint && git-branch-is master && travis-status -b master -c -wx && appveyor-status -b master -c -p kevinoid/promise-nodeify -w && istanbul check-coverage --statements 95 coverage/coverage.json","test":"npm run lint && npm run test-unit","test-ci":"npm run test && npm run build","test-ci-cov":"npm run test-cov && npm run build","test-cov":"npm run lint && npm run test-unit-cov","test-unit":"mocha --recursive test","test-unit-cov":"istanbul cover -x test-lib/** _mocha -- --recursive test","upload-cov":"codecov < ./coverage/lcov.info && coveralls < ./coverage/lcov.info","version":"npm run build && git add dist && git commit --allow-empty -n -m \"Distributable files for v$npm_package_version\" && github_changelog_generator -t \"$npm_config_gcg_github_token\" --future-release \"$npm_package_version\" && echo && echo === Please edit CHANGELOG.md as desired, then exit === && echo && $npm_config_shell && git commit -m \"Update CHANGELOG.md for $npm_package_version\" CHANGELOG.md","version-deps":"npm install david depcheck git-branch-is travis-status"},"dependencies":{},"devDependencies":{"babel-core":"^6.26.0","babel-preset-es2015":"^6.24.1","bluebird":">=1.0.0","codecov":"^3.0.0","coveralls":"^3.0.0","greenkeeper-lockfile":"^1.15.1","eslint":"^4.6.1","eslint-config-airbnb-base":"^13.0.0","eslint-plugin-import":"^2.7.0","gulp":"^3.9.1","gulp-babel":"^7.0.0","gulp-rename":"^1.2.2","gulp-sourcemaps":"^2.6.4","gulp-uglify":"^3.0.0","gulp-umd":"^2.0.0","istanbul":"^0.4.1","jsdoc":"^3.4.1","mocha":"^5.0.0","nodecat":"^1.0.0","promise-finally":"^3.0.0","pump":"^3.0.0","rimraf":"^2.2.0"},"engines":{"node":">=6","npm":">=1.3.7"},"greenkeeper":{"ignore":["eslint"]},"gitHead":"9ed2e8a7af5f291f564742459c3f7592a7f98419","_id":"promise-nodeify@3.0.0","_npmVersion":"6.1.0","_nodeVersion":"8.11.2","_npmUser":{"name":"kevinoid","email":"kevin@kevinlocke.name"},"dist":{"shasum":"5a50901628e3c1059f7fe1173266d10032405ddf","size":10110,"noattachment":false,"key":"/promise-nodeify/-/promise-nodeify-3.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/promise-nodeify/download/promise-nodeify-3.0.0.tgz"},"maintainers":[{"name":"kevinoid","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/promise-nodeify_3.0.0_1530311486720_0.8892172063122672"},"_hasShrinkwrap":false,"publish_time":1530311486790,"_cnpm_publish_time":1530311486790,"_cnpmcore_publish_time":"2021-12-16T18:34:00.598Z"},"2.0.0":{"name":"promise-nodeify","version":"2.0.0","description":"Call a Node-style callback with the resolution value or rejection cause of a Promise without the common pitfalls.","keywords":["callback","nodeify","promise"],"license":"MIT","homepage":"https://github.com/kevinoid/promise-nodeify","bugs":{"url":"https://github.com/kevinoid/promise-nodeify/issues"},"author":{"name":"Kevin Locke","email":"kevin@kevinlocke.name"},"repository":{"type":"git","url":"git+https://github.com/kevinoid/promise-nodeify.git"},"main":"index.js","//":"All scripts should run in POSIX sh and Windows cmd.exe","scripts":{"benchmark":"cd benchmark && npm install && node index.js","build":"rimraf dist && gulp","clean":"rimraf coverage && rimraf doc","doc":"npm run doc-js && npm run doc-spec","doc-js":"rimraf doc/api && jsdoc -c jsdoc.conf.json .","doc-spec":"rimraf doc/spec && mkdir doc/spec && mocha --reporter doc --recursive test | nodecat doc-src/spec/header.xhtml - doc-src/spec/footer.xhtml > doc/spec/index.xhtml","lint":"npm run lint-js && npm run lint-doc","lint-doc":"jsdoc -t templates/silent -c jsdoc-lint.conf.json . && echo JSDoc passed.","lint-js":"eslint . && echo ESLint passed.","postpublish":"git -C doc push && git push --follow-tags origin master gh-pages && echo Remember to update GitHub Releases from CHANGELOG.md && echo until skywinder/github-changelog-generator#56 is fixed.","postversion":"rimraf doc && git clone -b gh-pages -l -q . doc && npm run doc && git -C doc add . && git -C doc commit -n -m \"Docs for v$npm_package_version\"","preversion":"depcheck --ignore-dirs doc && david && git-branch-is master && travis-status -b master -c -wx && appveyor-status -b master -c -w -p kevinoid/promise-nodeify && istanbul check-coverage --statements 95 coverage/coverage.json","test":"npm run lint && npm run test-unit","test-ci":"npm run test && npm run build","test-ci-cov":"npm run test-cov && npm run build","test-cov":"npm run lint && npm run test-unit-cov","test-unit":"mocha --recursive test","test-unit-cov":"istanbul cover -x test-lib/** _mocha -- --recursive test","upload-cov":"codecov < ./coverage/lcov.info && coveralls < ./coverage/lcov.info","version":"npm run build && git add dist && git commit --allow-empty -n -m \"Distributable files for v$npm_package_version\" && github_changelog_generator -t \"$npm_config_gcg_github_token\" --future-release \"$npm_package_version\" && echo && echo === Please edit CHANGELOG.md as desired, then exit === && echo && $npm_config_shell && git commit -m \"Update CHANGELOG.md for $npm_package_version\" CHANGELOG.md","version-deps":"npm install david depcheck git-branch-is travis-status"},"dependencies":{},"devDependencies":{"babel-core":"^6.26.0","babel-preset-es2015":"^6.24.1","bluebird":">=1.0.0","codecov":"^3.0.0","coveralls":"^3.0.0","eslint":"^4.6.1","eslint-config-airbnb-base":"^12.0.0","eslint-plugin-import":"^2.7.0","gulp":"^3.9.1","gulp-babel":"^7.0.0","gulp-rename":"^1.2.2","gulp-sourcemaps":"^2.6.4","gulp-uglify":"^3.0.0","gulp-umd":"^0.2.0","istanbul":"^0.4.1","jsdoc":"^3.4.1","mocha":"^5.0.0","nodecat":"^1.0.0","promise-finally":"^3.0.0","pump":"^2.0.0","rimraf":"^2.2.0"},"engines":{"node":">=4","npm":">=1.3.7"},"gitHead":"514cc371b9f200bc1793463389ff5acd706c4097","_id":"promise-nodeify@2.0.0","_npmVersion":"5.6.0","_nodeVersion":"8.9.3","_npmUser":{"name":"kevinoid","email":"kevin@kevinlocke.name"},"dist":{"shasum":"14055f438cddc31c89775a132a06888b74e180b5","size":11769,"noattachment":false,"key":"/promise-nodeify/-/promise-nodeify-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/promise-nodeify/download/promise-nodeify-2.0.0.tgz"},"maintainers":[{"name":"kevinoid","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/promise-nodeify-2.0.0.tgz_1516645501970_0.18386001838371158"},"directories":{},"publish_time":1516645503066,"_hasShrinkwrap":false,"_cnpm_publish_time":1516645503066,"_cnpmcore_publish_time":"2021-12-16T18:34:00.800Z"},"1.0.1":{"name":"promise-nodeify","version":"1.0.1","description":"Call a Node-style callback with the resolution value or rejection cause of a Promise without the common pitfalls.","keywords":["callback","nodeify","promise"],"license":"MIT","homepage":"https://github.com/kevinoid/promise-nodeify","bugs":{"url":"https://github.com/kevinoid/promise-nodeify/issues"},"author":{"name":"Kevin Locke","email":"kevin@kevinlocke.name"},"repository":{"type":"git","url":"git+https://github.com/kevinoid/promise-nodeify.git"},"main":"index.js","//":"All scripts should run in POSIX sh and Windows cmd.exe","scripts":{"benchmark":"cd benchmark && npm install && node index.js","build":"rimraf dist && gulp","clean":"rimraf coverage && rimraf doc","doc":"npm run doc-js && npm run doc-spec","doc-js":"rimraf doc/api && jsdoc -c jsdoc.conf.json .","doc-spec":"rimraf doc/spec && mkdir doc/spec && mocha --reporter doc --recursive test | nodecat doc-src/spec/header.xhtml - doc-src/spec/footer.xhtml > doc/spec/index.xhtml","lint":"npm run lint-js && npm run lint-doc","lint-doc":"jsdoc -t templates/silent -c jsdoc-lint.conf.json . && echo JSDoc passed.","lint-js":"node-version-gte-4 && eslint . && echo ESLint passed. || node-version-lt-4","postpublish":"git -C doc push && git push --follow-tags origin master gh-pages && echo Remember to update GitHub Releases from CHANGELOG.md && echo until skywinder/github-changelog-generator#56 is fixed.","postversion":"rimraf doc && git clone -b gh-pages -l -q . doc && npm run doc && git -C doc add . && git -C doc commit -n -m \"Docs for v$npm_package_version\"","preversion":"depcheck --ignores eslint-plugin-import --ignore-dirs doc && david -i gulp-sourcemaps,promise-finally && git-branch-is master && travis-status -b master -c -wx && appveyor-status -b master -c -w -p kevinoid/promise-nodeify && istanbul check-coverage --statements 95 coverage/coverage.json","test":"npm run lint && npm run test-unit","test-ci":"npm run test && npm run build","test-ci-cov":"npm run test-cov && npm run build","test-cov":"npm run lint && npm run test-unit-cov","test-unit":"mocha --recursive test","test-unit-cov":"istanbul cover -x test-lib/** _mocha -- --recursive test","upload-cov":"codecov < ./coverage/lcov.info && coveralls < ./coverage/lcov.info","version":"npm run build && git add dist && git commit --allow-empty -n -m \"Distributable files for v$npm_package_version\" && github_changelog_generator -t \"$npm_config_gcg_github_token\" --future-release \"$npm_package_version\" && echo && echo === Please edit CHANGELOG.md as desired, then exit === && echo && $npm_config_shell && git commit -m \"Update CHANGELOG.md for $npm_package_version\" CHANGELOG.md","version-deps":"npm install david depcheck git-branch-is travis-status"},"dependencies":{},"devDependencies":{"bluebird":">=1.0.0","codecov":"^2.0.1","coveralls":"^2.11.6","eslint":"^3.0.0","eslint-config-airbnb-base":"^11.0.0","eslint-plugin-import":"^2.2.0","gulp":"^3.9.1","gulp-rename":"^1.2.2","gulp-sourcemaps":"^2.5.0","gulp-uglify":"^3.0.0","gulp-umd":"^0.2.0","istanbul":"^0.4.1","jsdoc":"^3.4.1","mocha":"^3.2.0","node-version-check":"^2.1.1","nodecat":"^1.0.0","promise-finally":"^2.1.0","pump":"^1.0.2","rimraf":"^2.2.0"},"engines":{"node":">=0.10","npm":">=1.3.7"},"gitHead":"66695c4be1e36568936b4561649cf4335f9cbe54","_id":"promise-nodeify@1.0.1","_shasum":"05e78cce162f93021dd285c66dadc38adaaae38c","_from":".","_npmVersion":"4.1.1","_nodeVersion":"6.10.2","_npmUser":{"name":"kevinoid","email":"kevin@kevinlocke.name"},"dist":{"shasum":"05e78cce162f93021dd285c66dadc38adaaae38c","size":9918,"noattachment":false,"key":"/promise-nodeify/-/promise-nodeify-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/promise-nodeify/download/promise-nodeify-1.0.1.tgz"},"maintainers":[{"name":"kevinoid","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/promise-nodeify-1.0.1.tgz_1495333335049_0.9786366906482726"},"directories":{},"publish_time":1495333335367,"_hasShrinkwrap":false,"_cnpm_publish_time":1495333335367,"_cnpmcore_publish_time":"2021-12-16T18:34:01.025Z"},"1.0.0":{"name":"promise-nodeify","version":"1.0.0","description":"Call a Node-style callback with the resolution value or rejection cause of a Promise without the common pitfalls.","keywords":["callback","nodeify","promise"],"license":"MIT","homepage":"https://github.com/kevinoid/promise-nodeify","bugs":{"url":"https://github.com/kevinoid/promise-nodeify/issues"},"author":{"name":"Kevin Locke","email":"kevin@kevinlocke.name"},"repository":{"type":"git","url":"git+https://github.com/kevinoid/promise-nodeify.git"},"main":"index.js","//":"All scripts should run in POSIX sh and Windows cmd.exe","scripts":{"benchmark":"cd benchmark && npm install && node index.js","build":"rimraf dist && gulp","clean":"rimraf coverage && rimraf doc","doc":"npm run doc-js && npm run doc-spec","doc-js":"rimraf doc/api && jsdoc -c jsdoc.conf.json .","doc-spec":"rimraf doc/spec && mkdir doc/spec && mocha --reporter doc --recursive test | nodecat doc-src/spec/header.xhtml - doc-src/spec/footer.xhtml > doc/spec/index.xhtml","lint":"npm run lint-js && npm run lint-doc","lint-doc":"jsdoc -t templates/silent -c jsdoc-lint.conf.json . && echo JSDoc passed.","lint-js":"node-version-gte-4 && eslint . && echo ESLint passed. || node-version-lt-4","postpublish":"git -C doc push && git push --follow-tags origin master gh-pages && echo Remember to update GitHub Releases from CHANGELOG.md && echo until skywinder/github-changelog-generator#56 is fixed.","postversion":"rimraf doc && git clone -b gh-pages -l -q . doc && npm run doc && git -C doc add . && git -C doc commit -n -m \"Docs for v$npm_package_version\"","preversion":"depcheck --ignores eslint-plugin-import --ignore-dirs doc && david -i gulp-sourcemaps,promise-finally && git-branch-is master && travis-status -b master -c -wx && appveyor-status -b master -c -w -p kevinoid/promise-nodeify && istanbul check-coverage --statements 95 coverage/coverage.json","test":"npm run lint && npm run test-unit","test-cov":"npm run lint && npm run test-unit-cov","test-unit":"mocha --recursive test","test-unit-cov":"istanbul cover -x test-lib/** _mocha -- --recursive test","upload-cov":"codecov < ./coverage/lcov.info && coveralls < ./coverage/lcov.info","version":"npm run build && git add dist && git commit --allow-empty -n -m \"Distributable files for v$npm_package_version\" && github_changelog_generator -t \"$npm_config_gcg_github_token\" --future-release \"$npm_package_version\" && echo && echo === Please edit CHANGELOG.md as desired, then exit === && echo && $npm_config_shell && git commit -m \"Update CHANGELOG.md for $npm_package_version\" CHANGELOG.md","version-deps":"npm install david depcheck git-branch-is travis-status"},"dependencies":{},"devDependencies":{"bluebird":">=1.0.0","codecov":"^1.0.1","coveralls":"^2.11.6","eslint":"^3.0.0","eslint-config-airbnb-base":"^11.0.0","eslint-plugin-import":"^2.2.0","gulp":"^3.9.1","gulp-rename":"^1.2.2","gulp-sourcemaps":"^1.6.0","gulp-uglify":"^2.0.0","gulp-umd":"^0.2.0","istanbul":"^0.4.1","jsdoc":"^3.4.1","mocha":"^3.2.0","node-version-check":"^2.1.1","nodecat":"^1.0.0","promise-finally":"^2.1.0","rimraf":"^2.2.0"},"engines":{"node":">=0.10","npm":">=1.3.7"},"gitHead":"cb14f975d8c2956d5867a13390dce7f7155cef3a","_id":"promise-nodeify@1.0.0","_shasum":"2d3e056c5380fb910980e8fc15afa617679a3a85","_from":".","_npmVersion":"4.1.1","_nodeVersion":"6.9.2","_npmUser":{"name":"kevinoid","email":"kevin@kevinlocke.name"},"dist":{"shasum":"2d3e056c5380fb910980e8fc15afa617679a3a85","size":9708,"noattachment":false,"key":"/promise-nodeify/-/promise-nodeify-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/promise-nodeify/download/promise-nodeify-1.0.0.tgz"},"maintainers":[{"name":"kevinoid","email":""}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/promise-nodeify-1.0.0.tgz_1487999635462_0.39446079824119806"},"directories":{},"publish_time":1487999636214,"_hasShrinkwrap":false,"_cnpm_publish_time":1487999636214,"_cnpmcore_publish_time":"2021-12-16T18:34:01.248Z"},"0.1.0":{"name":"promise-nodeify","version":"0.1.0","description":"Call a Node-style callback with the resolution value or rejection cause of a Promise without the common pitfalls.","keywords":["callback","nodeify","promise"],"license":"MIT","homepage":"https://github.com/kevinoid/promise-nodeify","bugs":{"url":"https://github.com/kevinoid/promise-nodeify/issues"},"author":{"name":"Kevin Locke","email":"kevin@kevinlocke.name"},"repository":{"type":"git","url":"git+https://github.com/kevinoid/promise-nodeify.git"},"main":"index.js","//":"All scripts should run in POSIX sh and Windows cmd.exe","scripts":{"benchmark":"cd benchmark && npm install && node index.js","build":"rimraf dist && gulp","clean":"rimraf coverage && rimraf doc","doc":"npm run doc-js && npm run doc-spec","doc-js":"rimraf doc/api && jsdoc -c jsdoc.conf.json .","doc-spec":"rimraf doc/spec && mkdir doc/spec && mocha --reporter doc --recursive test | nodecat doc-src/spec/header.xhtml - doc-src/spec/footer.xhtml > doc/spec/index.xhtml","lint":"npm run lint-js && npm run lint-doc","lint-doc":"jsdoc -c jsdoc-lint.conf.json . && echo JSDoc passed.","lint-js":"eslint . && echo ESLint passed.","postpublish":"git -C doc push && git push --follow-tags origin master gh-pages && echo Remember to update GitHub Releases from CHANGELOG.md && echo until skywinder/github-changelog-generator#56 is fixed.","postversion":"rimraf doc && git clone -b gh-pages -l -q . doc && npm run doc && git -C doc add . && git -C doc commit -n -m \"Docs for v$npm_package_version\"","preversion":"git-branch-is master && travis-status -b -c -qwx && depcheck && david","test":"npm run lint && npm run test-unit","test-cov":"npm run lint && npm run test-unit-cov","test-unit":"mocha --recursive test","test-unit-cov":"istanbul cover -x test-lib/** _mocha -- --recursive test","upload-cov":"codecov < ./coverage/lcov.info && coveralls < ./coverage/lcov.info","version":"npm run build && git add dist && git commit -n -m \"Distributable files for v$npm_package_version\" && github_changelog_generator -t \"$npm_config_gcg_github_token\" --future-release \"$npm_package_version\" && echo && echo === Please edit CHANGELOG.md as desired, then exit === && echo && $npm_config_shell && git commit -m \"Update CHANGELOG.md for $npm_package_version\" CHANGELOG.md","version-deps":"npm install david depcheck git-branch-is travis-status"},"dependencies":{},"devDependencies":{"bluebird":">=1.0.0","codecov":"^1.0.1","coveralls":"^2.11.6","eslint":"^2.3.0","eslint-config-airbnb":"^6.0.1","gulp":"^3.9.1","gulp-rename":"^1.2.2","gulp-sourcemaps":"^1.6.0","gulp-uglify":"^1.5.3","gulp-umd":"^0.2.0","istanbul":"^0.4.1","jsdoc":"^3.4.0","mocha":"^2.3.4","nodecat":"^0.1.0","promise-finally":"^2.1.0","rimraf":"^2.2.0"},"engines":{"node":">=0.10","npm":">=1.3.7"},"gitHead":"6ee165372cea1ebb660557c54ba4da04e109c8d4","_id":"promise-nodeify@0.1.0","_shasum":"4a00b8237537d535240cc6665c247b47ca844970","_from":".","_npmVersion":"3.7.5","_nodeVersion":"4.3.1","_npmUser":{"name":"kevinoid","email":"kevin@kevinlocke.name"},"dist":{"shasum":"4a00b8237537d535240cc6665c247b47ca844970","size":11478,"noattachment":false,"key":"/promise-nodeify/-/promise-nodeify-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/promise-nodeify/download/promise-nodeify-0.1.0.tgz"},"maintainers":[{"name":"kevinoid","email":""}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/promise-nodeify-0.1.0.tgz_1459576935868_0.6069809279870242"},"directories":{},"publish_time":1459576936386,"_hasShrinkwrap":false,"_cnpm_publish_time":1459576936386,"_cnpmcore_publish_time":"2021-12-16T18:34:01.456Z"}},"readme":"promise-nodeify\n===============\n\n[![Build Status: Linux](https://img.shields.io/travis/kevinoid/promise-nodeify/master.svg?style=flat&label=build+on+linux)](https://travis-ci.org/kevinoid/promise-nodeify)\n[![Build Status: Windows](https://img.shields.io/appveyor/ci/kevinoid/promise-nodeify/master.svg?style=flat&label=build+on+windows)](https://ci.appveyor.com/project/kevinoid/promise-nodeify)\n[![Coverage](https://img.shields.io/codecov/c/github/kevinoid/promise-nodeify.svg?style=flat)](https://codecov.io/github/kevinoid/promise-nodeify?branch=master)\n[![Dependency Status](https://img.shields.io/david/kevinoid/promise-nodeify.svg?style=flat)](https://david-dm.org/kevinoid/promise-nodeify)\n[![Supported Node Version](https://img.shields.io/node/v/promise-nodeify.svg?style=flat)](https://www.npmjs.com/package/promise-nodeify)\n[![Version on NPM](https://img.shields.io/npm/v/promise-nodeify.svg?style=flat)](https://www.npmjs.com/package/promise-nodeify)\n\nCall a Node-style callback with the resolution value or rejection cause of a\nPromise without the common pitfalls.\n\n## Introductory Example\n\n```js\nvar promiseNodeify = require('promise-nodeify');\n\n// Function which returns a Promise\nfunction returnsPromise() {\n  return new Promise(function(resolve, reject) {\n    resolve(42);\n  });\n}\n\n// Function which takes an optional node-style callback\nfunction takesCallback(callback) {\n  var promise = returnsPromise();\n  // if callback is not a function, promise is returned as-is\n  // otherwise callback will be called when promise is resolved or rejected\n  // promise will not cause unhandledRejection if callback is a function\n  return promiseNodeify(promise, callback);\n}\n```\n\n## Features\n\nThe important features of `nodeify` as compared to naive implementations:\n\n* Creates `Error` for falsey rejection causes.  Since Promises may resolve or\n  reject without providing a value or cause, the callback would have no way to\n  distinguish success from failure.  This module ensures the error argument is\n  always truthy, substituting an `Error` when the rejection cause is falsey\n  (and passing the original value as the `.cause` property, as bluebird does).\n* Exceptions thrown by callback cause `uncaughtException` as they would for\n  other callbacks (unlike passing callback to `.then`, which causes\n  `unhandledRejection` or swallows them).\n* The callback handles the promise rejection, preventing `unhandledRejection`\n  (unlike if the promise were ignored and callback invoked directly).\n* Reduces confusion by only returning a Promise when no callback is given\n  (as opposed to returning the promise argument, which creates uncertainty\n  about `unhandledRejection`s and multiple threads of control - or returning\n  the result passing the callback to `.then`, which resolves to the callback\n  result).\n\n## Behavior Comparison\n\nThis module provides similar behavior to several popular promise libraries in\na promise-library-agnostic way which only requires the ES6 promise\nfunctionality subset.  However, these existing implementations differ in\nsubtle ways.  A brief comparison:\n\nBehavior                  | this module           | [bluebird `#asCallback`][bb-ascallback]      | [es-nodeify][es-nodeify]              | [nodeify][nodeify]                    | [then `#nodeify`][then-nodeify] | [Un-thenify][unthenify]<sup>[1](#note-1)</sup> | [when.js `.bindCallback`][when-bindcallback]\n--------------------------|-----------------------|----------------------------------------------|---------------------------------------|---------------------------------------|---------------------------------|------------------------------------------------|---------------------------------------------\nreturns (with `function`) | `undefined`           | `this` `Promise`<sup>[2](#note-2)</sup>      | `undefined`                           | `Promise<undefined>`                  | `undefined`                     | `undefined`                                    | `when(promise)`\nreturns (with falsey)     | `promise`             | `promise`                                    | `promise`                             | `Promise<undefined>`                  | `promise`                       | `undefined` with `unhandledRejection`          | `when(promise)`\nreturns (non-function)    | `promise`             | `promise`                                    | `undefined` with `unhandledRejection` | `promise`                             | `promise`                       | `undefined` with `unhandledRejection`          | `when(promise)` with `uncaughtException`\ncallback exception        | `uncaughtException`   | `uncaughtException`                          | `unhandledRejection`                  | `uncaughtException`                   | `uncaughtException`             | `unhandledRejection`                           | `uncaughtException`\nfalsey cause              | `Error` with `.cause` | `Error` with `.cause`<sup>[3](#note-3)</sup> | `Error`                               | falsey cause                          | falsey cause                    | `TypeError`                                    | falsey cause\nreject argument length    | 1                     | 1                                            | 1                                     | 1                                     | 1                               | 1                                              | 2\nresolve argument length   | 2                     | `undefined` ? 1 : 2<sup>[4](#note-4)</sup>   | 2                                     | 2                                     | 2                               | 2                                              | 2\nextra argument            | ignored               | options<sup>[5](#note-5)</sup>               | ignored                               | ignored                               | `this` of callback              | ignored                                        | ignored\n\nNotes:\n\n1. <a id=\"note-1\" name=\"note-2\" /> Un-thenify serves a similar purpose, but\n   wraps the Promise-returning function rather than taking the Promise as an\n   argument.\n2. <a id=\"note-2\" name=\"note-3\" /> Temporarily reverted in\n   https://github.com/petkaantonov/bluebird/issues/151 and restored in\n   https://github.com/petkaantonov/bluebird/issues/168\n3. <a id=\"note-3\" name=\"note-4\" /> In response to\n   https://github.com/petkaantonov/bluebird/issues/434\n4. <a id=\"note-4\" name=\"note-5\" /> In response to\n   https://github.com/petkaantonov/bluebird/issues/170\n5. <a id=\"note-5\" name=\"note-6\" /> Supports the `spread` boolean option to\n   pass `Array` values as separate arguments to `callback`.\n\n## Performance Comparison\n\nThese benchmarks were done using the [benchmark/index.js](benchmark/index.js)\nscript on an `Intel(R) Core(TM) i5-3320M CPU @ 2.60GHz` with Node v4.3.1 on\nLinux and the following module versions:\n\n| Module                                           | Version |\n|--------------------------------------------------|---------|\n| [`benchmark`][npm-benchmark]                     | 2.1.0   |\n| [`bluebird`][npm-bluebird]                       | 3.3.3   |\n| [`cli-table`][npm-cli-table]                     | 0.3.1   |\n| [`es-nodeify`][npm-es-nodeify]                   | 1.0.0   |\n| [`microtime`][npm-microtime]                     | 2.0.0   |\n| [`native-promise-only`][npm-native-promise-only] | 0.8.1   |\n| [`nodeify`][npm-nodeify]                         | 1.0.0   |\n| [`pinkie-promise`][npm-pinkie-promise]           | 2.0.0   |\n| [`promise`][npm-promise]                         | 7.1.1   |\n| [`q`][npm-q]                                     | 1.4.1   |\n| [`rsvp`][npm-rsvp]                               | 3.2.1   |\n| [`unthenify`][npm-unthenify]                     | 1.0.1   |\n| [`when`][npm-when]                               | 3.7.7   |\n\n### Nodeify Resolved Promise\n\nPerformance (in operations per second) of calling `nodeify` on a resolved\npromise (larger is better):\n\n| ops/sec           | bluebird      | native      | npo         | pinkie      | q          | rsvp          | then          | when          |\n|-------------------|--------------:|------------:|------------:|------------:|-----------:|--------------:|--------------:|--------------:|\n| bluebird#nodeify  | 1,922,721.987 | TypeError   | TypeError   | TypeError   | TypeError  | TypeError     | TypeError     | TypeError     |\n| es-nodeify        | 1,345,702.588 | 506,103.345 | 510,887.217 | 534,013.961 | 68,915.816 | 1,974,250.737 | 2,096,468.119 | 1,756,177.934 |\n| nodeify           | 147,481.019   | 251,414.264 | 251,535.145 | 253,880.998 | 58,504.098 | 1,355,812.482 | 1,102,467.756 | 1,160,226.624 |\n| promiseNodeify    | 1,586,092.279 | 481,842.79  | 452,529.247 | 455,657.062 | 66,045.273 | 2,108,607.126 | 2,370,823.723 | 1,942,722.539 |\n| then#nodeify      | 136,716.987   | 202,670.23  | 225,297.257 | 231,042.286 | 56,384.953 | 764,719.55    | 1,320,158.92  | 739,062.155   |\n| unthenify         | 100,638.922   | 79,097.99   | 80,488.25   | 78,298.365  | 40,683.82  | 103,125.162   | 100,618.139   | 101,887.997   |\n| when.bindCallback | 823.326       | 856.669     | 842.975     | 834.864     | 748.669    | 847.556       | 850.316       | 839.995       |\n\n<!-- GitHub sanitizes my attempts to make this toggleable.  Hide for now.\n    bluebird#nodeify with bluebird x 1,922,722 ops/sec ±1.71% (80 runs sampled)\n    bluebird#nodeify with npo: TypeError: this._then is not a function\n    bluebird#nodeify with pinkie: TypeError: this._then is not a function\n    bluebird#nodeify with q: TypeError: this._then is not a function\n    bluebird#nodeify with rsvp: TypeError: this._then is not a function\n    bluebird#nodeify with then: TypeError: this._then is not a function\n    bluebird#nodeify with when: TypeError: this._then is not a function\n    bluebird#nodeify with native: TypeError: this._then is not a function\n    es-nodeify with bluebird x 1,345,703 ops/sec ±0.84% (81 runs sampled)\n    es-nodeify with npo x 510,887 ops/sec ±1.32% (85 runs sampled)\n    es-nodeify with pinkie x 534,014 ops/sec ±0.92% (84 runs sampled)\n    es-nodeify with q x 68,916 ops/sec ±2.99% (70 runs sampled)\n    es-nodeify with rsvp x 1,974,251 ops/sec ±0.84% (85 runs sampled)\n    es-nodeify with then x 2,096,468 ops/sec ±0.77% (84 runs sampled)\n    es-nodeify with when x 1,756,178 ops/sec ±3.48% (82 runs sampled)\n    es-nodeify with native x 506,103 ops/sec ±1.36% (87 runs sampled)\n    nodeify with bluebird x 147,481 ops/sec ±2.80% (71 runs sampled)\n    nodeify with npo x 251,535 ops/sec ±2.60% (77 runs sampled)\n    nodeify with pinkie x 253,881 ops/sec ±2.53% (67 runs sampled)\n    nodeify with q x 58,504 ops/sec ±4.30% (67 runs sampled)\n    nodeify with rsvp x 1,355,812 ops/sec ±2.98% (81 runs sampled)\n    nodeify with then x 1,102,468 ops/sec ±2.09% (81 runs sampled)\n    nodeify with when x 1,160,227 ops/sec ±3.95% (79 runs sampled)\n    nodeify with native x 251,414 ops/sec ±3.02% (77 runs sampled)\n    promiseNodeify with bluebird x 1,586,092 ops/sec ±1.94% (81 runs sampled)\n    promiseNodeify with npo x 452,529 ops/sec ±0.52% (84 runs sampled)\n    promiseNodeify with pinkie x 455,657 ops/sec ±0.50% (85 runs sampled)\n    promiseNodeify with q x 66,045 ops/sec ±4.14% (71 runs sampled)\n    promiseNodeify with rsvp x 2,108,607 ops/sec ±3.66% (81 runs sampled)\n    promiseNodeify with then x 2,370,824 ops/sec ±1.08% (82 runs sampled)\n    promiseNodeify with when x 1,942,723 ops/sec ±0.79% (86 runs sampled)\n    promiseNodeify with native x 481,843 ops/sec ±0.41% (87 runs sampled)\n    then#nodeify with bluebird x 136,717 ops/sec ±1.83% (82 runs sampled)\n    then#nodeify with npo x 225,297 ops/sec ±2.92% (81 runs sampled)\n    then#nodeify with pinkie x 231,042 ops/sec ±2.14% (80 runs sampled)\n    then#nodeify with q x 56,385 ops/sec ±3.88% (75 runs sampled)\n    then#nodeify with rsvp x 764,720 ops/sec ±3.37% (81 runs sampled)\n    then#nodeify with then x 1,320,159 ops/sec ±2.67% (81 runs sampled)\n    then#nodeify with when x 739,062 ops/sec ±0.78% (85 runs sampled)\n    then#nodeify with native x 202,670 ops/sec ±6.14% (74 runs sampled)\n    unthenify with bluebird x 100,639 ops/sec ±2.24% (84 runs sampled)\n    unthenify with npo x 80,488 ops/sec ±2.78% (84 runs sampled)\n    unthenify with pinkie x 78,298 ops/sec ±3.08% (81 runs sampled)\n    unthenify with q x 40,684 ops/sec ±3.94% (73 runs sampled)\n    unthenify with rsvp x 103,125 ops/sec ±0.78% (84 runs sampled)\n    unthenify with then x 100,618 ops/sec ±3.56% (83 runs sampled)\n    unthenify with when x 101,888 ops/sec ±0.46% (82 runs sampled)\n    unthenify with native x 79,098 ops/sec ±3.09% (83 runs sampled)\n    when.bindCallback with bluebird x 823 ops/sec ±1.21% (76 runs sampled)\n    when.bindCallback with npo x 843 ops/sec ±0.96% (75 runs sampled)\n    when.bindCallback with pinkie x 835 ops/sec ±0.97% (75 runs sampled)\n    when.bindCallback with q x 749 ops/sec ±1.55% (73 runs sampled)\n    when.bindCallback with rsvp x 848 ops/sec ±0.94% (77 runs sampled)\n    when.bindCallback with then x 850 ops/sec ±0.86% (76 runs sampled)\n    when.bindCallback with when x 840 ops/sec ±0.86% (76 runs sampled)\n    when.bindCallback with native x 857 ops/sec ±1.41% (38 runs sampled)\n-->\n\n### Nodeify Rejected Promise\n\nPerformance (in operations per second) of calling `nodeify` on a rejected\npromise (larger is better):\n\n\n| ops/sec           | bluebird      | native      | npo         | pinkie      | q          | rsvp          | then          | when          |\n|-------------------|--------------:|------------:|------------:|------------:|-----------:|--------------:|--------------:|--------------:|\n| bluebird#nodeify  | 1,889,496.469 | TypeError   | TypeError   | TypeError   | TypeError  | TypeError     | TypeError     | TypeError     |\n| es-nodeify        | 1,247,981.228 | 520,349.959 | 455,337.77  | 466,964.692 | 64,703.247 | 2,182,281.005 | 2,062,330.035 | 1,889,184.935 |\n| nodeify           | 147,454.87    | 325,956.476 | 326,958.556 | 325,971.637 | 53,878.098 | 1,232,726.201 | 952,338.091   | 926,626.949   |\n| promiseNodeify    | 1,170,756.604 | 465,186.326 | 478,343.59  | 489,024.094 | 62,905.801 | 2,097,277.371 | 1,928,682.943 | 1,497,451.328 |\n| then#nodeify      | 131,588.987   | 241,627.02  | 246,557.24  | 245,427.553 | 49,655.492 | 684,232.864   | 1,178,175.996 | 634,041.464   |\n| unthenify         | 96,359.916    | 82,291.679  | 82,507.055  | 83,324.584  | 38,842.741 | 96,432.332    | 97,113.05     | 99,892.099    |\n| when.bindCallback | 822.083       | 837.698     | 848.358     | 851.348     | 789.546    | 854.184       | 844.102       | 851.644       |\n\n<!-- GitHub sanitizes my attempts to make this toggleable.  Hide for now.\n    bluebird#nodeify with bluebird x 1,889,496 ops/sec ±1.37% (83 runs sampled)\n    bluebird#nodeify with npo: TypeError: this._then is not a function\n    bluebird#nodeify with pinkie: TypeError: this._then is not a function\n    bluebird#nodeify with q: TypeError: this._then is not a function\n    bluebird#nodeify with rsvp: TypeError: this._then is not a function\n    bluebird#nodeify with then: TypeError: this._then is not a function\n    bluebird#nodeify with when: TypeError: this._then is not a function\n    bluebird#nodeify with native: TypeError: this._then is not a function\n    es-nodeify with bluebird x 1,247,981 ops/sec ±1.41% (78 runs sampled)\n    es-nodeify with npo x 455,338 ops/sec ±3.80% (85 runs sampled)\n    es-nodeify with pinkie x 466,965 ops/sec ±2.77% (81 runs sampled)\n    es-nodeify with q x 64,703 ops/sec ±3.54% (73 runs sampled)\n    es-nodeify with rsvp x 2,182,281 ops/sec ±2.07% (83 runs sampled)\n    es-nodeify with then x 2,062,330 ops/sec ±0.67% (83 runs sampled)\n    es-nodeify with when x 1,889,185 ops/sec ±0.62% (85 runs sampled)\n    es-nodeify with native x 520,350 ops/sec ±0.39% (86 runs sampled)\n    nodeify with bluebird x 147,455 ops/sec ±2.51% (74 runs sampled)\n    nodeify with npo x 326,959 ops/sec ±2.44% (81 runs sampled)\n    nodeify with pinkie x 325,972 ops/sec ±2.19% (82 runs sampled)\n    nodeify with q x 53,878 ops/sec ±4.86% (66 runs sampled)\n    nodeify with rsvp x 1,232,726 ops/sec ±4.10% (81 runs sampled)\n    nodeify with then x 952,338 ops/sec ±0.98% (83 runs sampled)\n    nodeify with when x 926,627 ops/sec ±5.41% (69 runs sampled)\n    nodeify with native x 325,956 ops/sec ±3.21% (77 runs sampled)\n    promiseNodeify with bluebird x 1,170,757 ops/sec ±2.39% (84 runs sampled)\n    promiseNodeify with npo x 478,344 ops/sec ±1.87% (84 runs sampled)\n    promiseNodeify with pinkie x 489,024 ops/sec ±0.47% (86 runs sampled)\n    promiseNodeify with q x 62,906 ops/sec ±4.73% (69 runs sampled)\n    promiseNodeify with rsvp x 2,097,277 ops/sec ±2.18% (84 runs sampled)\n    promiseNodeify with then x 1,928,683 ops/sec ±0.99% (85 runs sampled)\n    promiseNodeify with when x 1,497,451 ops/sec ±0.47% (83 runs sampled)\n    promiseNodeify with native x 465,186 ops/sec ±3.41% (85 runs sampled)\n    then#nodeify with bluebird x 131,589 ops/sec ±2.36% (81 runs sampled)\n    then#nodeify with npo x 246,557 ops/sec ±1.59% (88 runs sampled)\n    then#nodeify with pinkie x 245,428 ops/sec ±2.68% (82 runs sampled)\n    then#nodeify with q x 49,655 ops/sec ±4.59% (70 runs sampled)\n    then#nodeify with rsvp x 684,233 ops/sec ±0.56% (86 runs sampled)\n    then#nodeify with then x 1,178,176 ops/sec ±0.77% (83 runs sampled)\n    then#nodeify with when x 634,041 ops/sec ±2.52% (83 runs sampled)\n    then#nodeify with native x 241,627 ops/sec ±2.28% (86 runs sampled)\n    unthenify with bluebird x 96,360 ops/sec ±0.54% (85 runs sampled)\n    unthenify with npo x 82,507 ops/sec ±1.38% (85 runs sampled)\n    unthenify with pinkie x 83,325 ops/sec ±0.33% (85 runs sampled)\n    unthenify with q x 38,843 ops/sec ±3.26% (75 runs sampled)\n    unthenify with rsvp x 96,432 ops/sec ±4.63% (80 runs sampled)\n    unthenify with then x 97,113 ops/sec ±2.47% (83 runs sampled)\n    unthenify with when x 99,892 ops/sec ±0.48% (85 runs sampled)\n    unthenify with native x 82,292 ops/sec ±0.39% (85 runs sampled)\n    when with bluebird x 822 ops/sec ±1.11% (78 runs sampled)\n    when with npo x 848 ops/sec ±0.90% (77 runs sampled)\n    when with pinkie x 851 ops/sec ±0.99% (74 runs sampled)\n    when with q x 790 ops/sec ±1.72% (73 runs sampled)\n    when with rsvp x 854 ops/sec ±0.98% (75 runs sampled)\n    when with then x 844 ops/sec ±0.94% (74 runs sampled)\n    when with when x 852 ops/sec ±0.93% (75 runs sampled)\n    when with native x 838 ops/sec ±0.94% (76 runs sampled)\n-->\n\n## Installation\n\n### NPM\n\n[This package](https://www.npmjs.com/package/promise-nodeify) can be installed\nusing [npm](https://www.npmjs.com/) by running:\n\n```sh\nnpm install promise-nodeify\n```\n\n### Browser\n\nThis package can be installed using [bower](http://bower.io/) by running:\n\n```sh\nbower install promise-nodeify\n```\n\n### Without Package Manager\n\nThis module is also available with a [UMD](https://github.com/umdjs/umd)\nloader, both minified and un-minified, in the [`dist` directory](dist).  They\ncan be downloaded, self-hosted, or loaded from a CDN.  To use the [RawGit\nCDN](https://rawgit.com/), use the following (X)HTML:\n\n```html\n<script src=\"https://cdn.rawgit.com/kevinoid/promise-nodeify/v0.1.0/dist/promise-nodeify.min.js\"></script>\n```\n\n## Recipes\n\n### Delegate to `Promise.prototype.nodeify`\n\nIf the behavior differences discussed in the [Behavior\nComparison](#behavior-comparison) section (and any future differences which\nmay occur) are not significant to your use case and you are interested in\ntaking advantage of the potential [performance\nbenefit](#performance-comparison) of the implementation provided by the\npromise library, use the `.delegated` function:\n\n```js\n// Using .delegated delegates to .nodeify on the promise argument when present\nvar promiseNodeify = require('promise-nodeify').delegated;\n\nfunction returnsPromise() {\n  return new Promise(function(resolve, reject) {\n    resolve(42);\n  });\n}\n\nfunction takesCallback(callback) {\n  var promise = returnsPromise();\n  return promiseNodeify(promise, callback);\n}\n```\n\n### Polyfill `Promise.prototype.nodeify`\n\nTo polyfill the `.nodeify` (or `.asCallback`) method for a Promise library,\nassign the `.nodeifyThis` function to `Promise.prototype.nodeify` as follows:\n\n```js\nPromise.prototype.nodeify = require('promise-nodeify').nodeifyThis;\n\nfunction returnsPromise() {\n  return new Promise(function(resolve, reject) {\n    resolve(42);\n  });\n}\n\nfunction takesCallback(callback) {\n  var promise = returnsPromise();\n  return promise.nodeify(callback);\n}\n```\n\nMore examples can be found in the [test\nspecifications](https://kevinoid.github.io/promise-nodeify/spec).\n\n## API Docs\n\nFor a description of the available functions and their arguments, see the [API\nDocumentation](https://kevinoid.github.io/promise-nodeify/api).\n\n## Contributing\n\nContributions are welcome and very much appreciated!  Please add tests to\ncover any changes and ensure `npm test` passes.\n\nThe `dist` files are only updated for releases, so please don't include them\nin pull requests.\n\nIf the desired change is large, complex, backwards-incompatible, can have\nsignificantly differing implementations, or may not be in scope for this\nproject, opening an issue before writing the code can avoid frustration and\nsave a lot of time and effort.\n\n## License\n\nThis package is available under the terms of the\n[MIT License](https://opensource.org/licenses/MIT).\n\n[bb-ascallback]: http://bluebirdjs.com/docs/api/ascallback.html\n[es-nodeify]: https://github.com/robbertkl/es-nodeify\n[nodeify]: https://github.com/then/nodeify\n[npm-benchmark]: https://www.npmjs.com/package/benchmark\n[npm-bluebird]: https://www.npmjs.com/package/bluebird\n[npm-cli-table]: https://www.npmjs.com/package/cli-table\n[npm-es-nodeify]: https://www.npmjs.com/package/es-nodeify\n[npm-microtime]: https://www.npmjs.com/package/microtime\n[npm-native-promise-only]: https://www.npmjs.com/package/native-promise-only\n[npm-nodeify]: https://www.npmjs.com/package/nodeify\n[npm-pinkie-promise]: https://www.npmjs.com/package/pinkie-promise\n[npm-promise]: https://www.npmjs.com/package/promise\n[npm-q]: https://www.npmjs.com/package/q\n[npm-rsvp]: https://www.npmjs.com/package/rsvp\n[npm-unthenify]: https://www.npmjs.com/package/unthenify\n[npm-when]: https://www.npmjs.com/package/when\n[then-nodeify]: https://github.com/then/promise#promisenodeifycallback\n[unthenify]: https://github.com/blakeembrey/unthenify\n[when-bindcallback]: https://github.com/cujojs/when/blob/master/docs/api.md#nodebindcallback\n","_attachments":{},"homepage":"https://github.com/kevinoid/promise-nodeify","bugs":{"url":"https://github.com/kevinoid/promise-nodeify/issues"},"license":"MIT"}