{"_id":"thenify","_rev":"34-e93afc0436fd93e5f4b1f1b4b653d83a","name":"thenify","description":"Promisify a callback-based function","dist-tags":{"latest":"3.3.1"},"versions":{"1.0.0":{"name":"thenify","description":"Globally make everything a promise!","version":"1.0.0","author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"license":"MIT","repository":{"type":"git","url":"https://github.com/thenables/thenify"},"dependencies":{},"devDependencies":{"mocha":"1","istanbul":"0"},"scripts":{"test":"mocha --reporter spec","test-cov":"istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot","test-travis":"istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot"},"keywords":["then","array","promise","promises","await"],"files":["index.js"],"gitHead":"5d5303a6c866da59693ab41996e7f4fff66e50d0","bugs":{"url":"https://github.com/thenables/thenify/issues"},"homepage":"https://github.com/thenables/thenify","_id":"thenify@1.0.0","_shasum":"bdd58503e7e2590f9c4cf237eec1d5cdcae050ed","_from":".","_npmVersion":"1.4.21","_npmUser":{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},"maintainers":[{"name":"jongleberry","email":"jonathanrichardong@gmail.com"}],"dist":{"shasum":"bdd58503e7e2590f9c4cf237eec1d5cdcae050ed","tarball":"https://registry.npmjs.org/thenify/-/thenify-1.0.0.tgz","integrity":"sha512-pjrtZfuNpHQ6e9CSJ4fU4cqiaMpsBTrYHb7NGgiXtDTYx3JOs8KYC8aDz1v8Z8svXi2YsOnm7I6OVnqFKWfQzA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGdSbh9v/fH8rdEVdPCNy+CC5z/F0AoojwPQcFv3XcgFAiEAuW5w5eyudhxrpYiR7tCl2FnSDGqAMzF8AS0iis36D10="}]},"directories":{}},"2.0.0":{"name":"thenify","description":"Promisify a callback-based function","version":"2.0.0","author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"license":"MIT","repository":{"type":"git","url":"https://github.com/thenables/thenify"},"dependencies":{"native-or-bluebird":"1"},"devDependencies":{"bluebird":"2","istanbul":"0","mocha":"2"},"scripts":{"test":"mocha --reporter spec","test-cov":"istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot","test-travis":"istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot"},"keywords":["promisify","promise","thenify","then","es6"],"files":["index.js"],"gitHead":"db03bb73f7b5e22bc6e1b268d89a50781f1bea0d","bugs":{"url":"https://github.com/thenables/thenify/issues"},"homepage":"https://github.com/thenables/thenify","_id":"thenify@2.0.0","_shasum":"a1c6a07b4274787c412289d4f8679b545205f186","_from":".","_npmVersion":"2.1.12","_nodeVersion":"0.11.14","_npmUser":{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},"maintainers":[{"name":"jongleberry","email":"jonathanrichardong@gmail.com"}],"dist":{"shasum":"a1c6a07b4274787c412289d4f8679b545205f186","tarball":"https://registry.npmjs.org/thenify/-/thenify-2.0.0.tgz","integrity":"sha512-+VvaqEb6gnU3PY6kcfQUPPXtSFG8d5+7sMjdKRHM3byLIXl6m3pCVIlU4RTMAXbz0NVV0MdyOaAvJx4oW/73UQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHHYJnHwFt/3bkU7H0r1IlcYf+Vvl3rwJS43eVnLwXT0AiEAvqDeAQLBg8r2a9gAniz8Q2Qzd1MyBG9dIDBSug47DSQ="}]},"directories":{}},"3.0.0":{"name":"thenify","description":"Promisify a callback-based function","version":"3.0.0","author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"license":"MIT","repository":{"type":"git","url":"https://github.com/thenables/thenify"},"dependencies":{"native-or-bluebird":"1"},"devDependencies":{"bluebird":"2","istanbul":"0","mocha":"2"},"scripts":{"test":"mocha --reporter spec","test-cov":"istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot","test-travis":"istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot"},"keywords":["promisify","promise","thenify","then","es6"],"files":["index.js"],"gitHead":"27fa50bad00b65a1e664ca085c65acd8c5988572","bugs":{"url":"https://github.com/thenables/thenify/issues"},"homepage":"https://github.com/thenables/thenify","_id":"thenify@3.0.0","_shasum":"7de788acfb33bcc0dae8280c98cda7e17e9cf9ee","_from":".","_npmVersion":"2.1.12","_nodeVersion":"0.11.14","_npmUser":{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},"maintainers":[{"name":"jongleberry","email":"jonathanrichardong@gmail.com"}],"dist":{"shasum":"7de788acfb33bcc0dae8280c98cda7e17e9cf9ee","tarball":"https://registry.npmjs.org/thenify/-/thenify-3.0.0.tgz","integrity":"sha512-cdvq+SJ2VswEgO50R4WXvPFmF5LaY2VwCU4HJQ1Q/0VdPxhZHu7G6w1Wss9kDAP2mVOctdi5yPSs+R/wYrLiOQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCt9eyXRtzO+Qeqp0ijbx4Ekrt8lbzjyJgUBMStLQvKaQIgLfykEtunOq6hDrbP4Tnq96oDpghntbQGmX/dDeltAMU="}]},"directories":{}},"3.1.0":{"name":"thenify","description":"Promisify a callback-based function","version":"3.1.0","author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"license":"MIT","repository":{"type":"git","url":"https://github.com/thenables/thenify"},"dependencies":{"native-or-bluebird":"1"},"devDependencies":{"bluebird":"2","istanbul":"0","mocha":"2"},"scripts":{"test":"mocha --reporter spec","test-cov":"istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot","test-travis":"istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot"},"keywords":["promisify","promise","thenify","then","es6"],"files":["index.js"],"gitHead":"4c093c3583662f20f3342d59f73d61bb96f7d826","bugs":{"url":"https://github.com/thenables/thenify/issues"},"homepage":"https://github.com/thenables/thenify","_id":"thenify@3.1.0","_shasum":"c27cbbc62b7c287edf1a1a3d5cc8426d8aed49f0","_from":".","_npmVersion":"2.1.12","_nodeVersion":"0.11.14","_npmUser":{"name":"dead_horse","email":"dead_horse@qq.com"},"maintainers":[{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},{"name":"dead-horse","email":"dead_horse@qq.com"},{"name":"dead_horse","email":"dead_horse@qq.com"}],"dist":{"shasum":"c27cbbc62b7c287edf1a1a3d5cc8426d8aed49f0","tarball":"https://registry.npmjs.org/thenify/-/thenify-3.1.0.tgz","integrity":"sha512-0ngb6mLUzolJyQry/KzJ8+u19Ak/MfLfODhyJVR/GFiobY9oqfiCdiyHh77RnxRmi5f+oYVPKc2UDCtkD/ip+w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBFi8gjpRpr3QX5qu7/nTDw2m+Km3xVg9BgUcV2Ow4rVAiAYBKJ9gXczKMg7JcXyCRJRPwFsezXNwxkcw7R36NYlJg=="}]},"directories":{}},"3.1.1":{"name":"thenify","description":"Promisify a callback-based function","version":"3.1.1","author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/thenables/thenify.git"},"dependencies":{"native-or-bluebird":"1"},"devDependencies":{"bluebird":"2","istanbul":"0","mocha":"2"},"scripts":{"test":"mocha --reporter spec","test-cov":"istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot","test-travis":"istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot"},"keywords":["promisify","promise","thenify","then","es6"],"files":["index.js"],"gitHead":"3c2af64fd708a33b969c05757bee8a12038eb211","bugs":{"url":"https://github.com/thenables/thenify/issues"},"homepage":"https://github.com/thenables/thenify#readme","_id":"thenify@3.1.1","_shasum":"f25114ce444dfa52fe5b39170baf5d3a05a63f06","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.1","_npmUser":{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},"dist":{"shasum":"f25114ce444dfa52fe5b39170baf5d3a05a63f06","tarball":"https://registry.npmjs.org/thenify/-/thenify-3.1.1.tgz","integrity":"sha512-kp/FWMYTJSL6qBr1tBvvwB5i6J7rlp35stv6VOCRY36YdPwQGynLLwX/RNPqjaeFdSQbzERssg0UGL0hzPtBYA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFd+dNaZH0KooUG6DHr53Svgq9IuBcq+V2rSSUwNJh/kAiBAThywK1SHKoZHGyXD6sD0f4R/2AtHQ/S1JhE6uhi14Q=="}]},"maintainers":[{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},{"name":"dead-horse","email":"dead_horse@qq.com"},{"name":"dead_horse","email":"dead_horse@qq.com"}],"directories":{}},"3.2.0":{"name":"thenify","description":"Promisify a callback-based function","version":"3.2.0","author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/thenables/thenify.git"},"dependencies":{"any-promise":"^1.0.0"},"devDependencies":{"bluebird":"^3.1.1","istanbul":"^0.4.0","mocha":"^2.0.0"},"scripts":{"test":"mocha --reporter spec","test-cov":"istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot","test-travis":"istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot"},"keywords":["promisify","promise","thenify","then","es6"],"files":["index.js"],"gitHead":"89bdcb82809dfa46a157b25c5d2bac36ed429b9b","bugs":{"url":"https://github.com/thenables/thenify/issues"},"homepage":"https://github.com/thenables/thenify#readme","_id":"thenify@3.2.0","_shasum":"40b902b1bc4416dc08d86f10ffff3586f0ec71b9","_from":".","_npmVersion":"3.3.12","_nodeVersion":"5.5.0","_npmUser":{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},"dist":{"shasum":"40b902b1bc4416dc08d86f10ffff3586f0ec71b9","tarball":"https://registry.npmjs.org/thenify/-/thenify-3.2.0.tgz","integrity":"sha512-f+vauK3A4dQhYtEgt9P6UkTtdUDjNCjSAeEvFXMDl4pKK+tuUX7iRbqRjpuIWAlqz5QRFOktkGzevmQU4Cw9Dg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFO147ULBhNL5ru1oY4ZA8hV2vHAEM3j8kQ9nmOcmb5EAiAG9WCjxaMUShfgzC38+YTg731dCqzCR9ZEQmisVdqhjA=="}]},"maintainers":[{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},{"name":"dead-horse","email":"dead_horse@qq.com"},{"name":"dead_horse","email":"dead_horse@qq.com"}],"_npmOperationalInternal":{"host":"packages-8-eu.internal.npmjs.com","tmp":"tmp/thenify-3.2.0.tgz_1454358563746_0.7461334459949285"},"directories":{}},"3.2.1":{"name":"thenify","description":"Promisify a callback-based function","version":"3.2.1","author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/thenables/thenify.git"},"dependencies":{"any-promise":"^1.0.0"},"devDependencies":{"bluebird":"^3.1.1","istanbul":"^0.4.0","mocha":"^3.0.2"},"scripts":{"test":"mocha --reporter spec","test-cov":"istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot","test-travis":"istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot"},"keywords":["promisify","promise","thenify","then","es6"],"files":["index.js"],"gitHead":"42e93a084347eed9ad34cd3f77728e7fe9b2c1c5","bugs":{"url":"https://github.com/thenables/thenify/issues"},"homepage":"https://github.com/thenables/thenify#readme","_id":"thenify@3.2.1","_shasum":"251fd1c80aff6e5cf57cb179ab1fcb724269bd11","_from":".","_npmVersion":"3.10.3","_nodeVersion":"4.4.7","_npmUser":{"name":"dead_horse","email":"dead_horse@qq.com"},"maintainers":[{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},{"name":"dead-horse","email":"dead_horse@qq.com"},{"name":"dead_horse","email":"dead_horse@qq.com"}],"dist":{"shasum":"251fd1c80aff6e5cf57cb179ab1fcb724269bd11","tarball":"https://registry.npmjs.org/thenify/-/thenify-3.2.1.tgz","integrity":"sha512-G0QT02yO1jmfA6lzyVYwu14Nw0HBTfsxM2Ixr3rCR4DXT94FtZNEnjPOVDqn7qVQV50INfEW2hNsFBuwCBs6Ow==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDbC6qVW/SYi8tJ/RFDvqrS0fgphL18LZlTSH1jSHRo2gIgNO8mpGMg2eEPIjy80CWNLzxc19YLWK74t4oJOt4tSW4="}]},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/thenify-3.2.1.tgz_1476096494606_0.22121428861282766"},"directories":{}},"3.3.0":{"name":"thenify","description":"Promisify a callback-based function","version":"3.3.0","author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/thenables/thenify.git"},"dependencies":{"any-promise":"^1.0.0"},"devDependencies":{"bluebird":"^3.1.1","istanbul":"^0.4.0","mocha":"^3.0.2"},"scripts":{"test":"mocha --reporter spec","test-cov":"istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot","test-travis":"istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot"},"keywords":["promisify","promise","thenify","then","es6"],"files":["index.js"],"gitHead":"aa21cfb64f47238c764d258d0faf7366a8487e36","bugs":{"url":"https://github.com/thenables/thenify/issues"},"homepage":"https://github.com/thenables/thenify#readme","_id":"thenify@3.3.0","_shasum":"e69e38a1babe969b0108207978b9f62b88604839","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.10.2","_npmUser":{"name":"dead_horse","email":"dead_horse@qq.com"},"dist":{"shasum":"e69e38a1babe969b0108207978b9f62b88604839","tarball":"https://registry.npmjs.org/thenify/-/thenify-3.3.0.tgz","integrity":"sha512-ho5BRit179DQqrTnGIjO+L9vLP/zLyGk6jXn70DLD6MTUYD2FSgR2Y4qWcgca90VD54sQ7GdQ2/C765V6kPcqA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICCC9oL4776NU9W9Kz+JCf7iQpeQtJJXDORXxj95hYI+AiBEoOSbHWVgK2kQ2SIacTs9Ri8b2ZViKpDjk8rV+QBjpQ=="}]},"maintainers":[{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},{"name":"dead-horse","email":"dead_horse@qq.com"},{"name":"dead_horse","email":"dead_horse@qq.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/thenify-3.3.0.tgz_1495187910351_0.656304276548326"},"directories":{}},"3.3.1":{"name":"thenify","description":"Promisify a callback-based function","version":"3.3.1","author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/thenables/thenify.git"},"dependencies":{"any-promise":"^1.0.0"},"devDependencies":{"bluebird":"^3.1.1","istanbul":"^0.4.0","mocha":"^3.0.2"},"scripts":{"test":"mocha --reporter spec","test-cov":"istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot","test-travis":"istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot"},"keywords":["promisify","promise","thenify","then","es6"],"gitHead":"1d054b4d60e72087f4e804565e540258ecee7f0b","bugs":{"url":"https://github.com/thenables/thenify/issues"},"homepage":"https://github.com/thenables/thenify#readme","_id":"thenify@3.3.1","_nodeVersion":"10.16.0","_npmVersion":"6.12.0","dist":{"integrity":"sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==","shasum":"8932e686a4066038a016dd9e2ca46add9838a95f","tarball":"https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz","fileCount":5,"unpackedSize":7920,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe6lNRCRA9TVsSAnZWagAAoHkP/2IZd+pjDrRz8i2lxJGN\nMG+Rd+SVktCgTu563t7Nq3N7kd2CjYG6OGpV0Pc4gcWPYOs2dEjZ7taC89R1\nRv7I+pL9aTPq5XF8WkQvNC/cjkMEV05jzbCklMzHTRwvvXlRPFbS2jjlIB5G\nibeSiw0LQhA3wbvPzuRMyX+O6QH+VzLvSDfN6dXW22LOYAsNPI4uFmYNDF1s\nqy4tQBQnlLkpDrJnwbQKife1/Z8JWZCZgFHu85rr1Ba6EUcCQ+N/Fq5wRX7/\nqaaSdkIudRpybcgqAzWOkK1gmQzF7Xocd3eCcoDVULE/F/LcB99a3DsI0YUH\nExvFFfDIqoCLe37rJfZg03fcmJIsCJD9IkxQcNJRAyhwy+2L1kNBeptHEKDo\nJ1S2RjzgYI9UGzSIY/n+9r1tQF4gRtpZayYeBVTjqV8rmzSdFa6rtnNteUBV\ncYVBfomr4mMaTIITtvKwNy9ynhVeeQNYnT8hG/k1aX+yO0QtdLseAhXZqZ11\nHAWaX3RECQYuJVTJdnj1468sPw63y6ERFD44ag1Ue4uuH2lYncjaGIBpG6X2\nFlNV8B2WgbuswL3XI0o7O0xe3oXX+b0vwwrbo3/3ecv6aocH6TFreROPUuox\nySImlBrP6/BOgvWu7j2bhFg7n41wzZ6kKoZmQZ3+jv8cdifUWRqswkucmPN3\nypVG\r\n=uAFu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEBXTljUSwfx0ims3CHwEjlxrbvBCdUWGkLmxhm4wE9EAiEAlYDeb7PVI+b4r8zKK35Twy/1hOBWlTZSoznsJxema04="}]},"maintainers":[{"email":"dead_horse@qq.com","name":"dead_horse"},{"email":"dead_horse@qq.com","name":"dead-horse"},{"email":"jonathanrichardong@gmail.com","name":"jongleberry"}],"_npmUser":{"name":"dead_horse","email":"dead_horse@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thenify_3.3.1_1592415057057_0.23597744543410548"},"_hasShrinkwrap":false}},"readme":"\n# thenify\n\n[![NPM version][npm-image]][npm-url]\n[![Build status][travis-image]][travis-url]\n[![Test coverage][coveralls-image]][coveralls-url]\n[![Dependency Status][david-image]][david-url]\n[![License][license-image]][license-url]\n[![Downloads][downloads-image]][downloads-url]\n\nPromisify a callback-based function using [`any-promise`](https://github.com/kevinbeaty/any-promise).\n\n- Preserves function names\n- Uses a native promise implementation if available and tries to fall back to a promise implementation such as `bluebird`\n- Converts multiple arguments from the callback into an `Array`, also support change the behavior by `options.multiArgs`\n- Resulting function never deoptimizes\n- Supports both callback and promise style\n\nAn added benefit is that `throw`n errors in that async function will be caught by the promise!\n\n## API\n\n### fn = thenify(fn, options)\n\nPromisifies a function.\n\n### Options\n\n`options` are optional.\n\n- `options.withCallback` - support both callback and promise style, default to `false`.\n- `options.multiArgs` - change the behavior when callback have multiple arguments. default to `true`.\n - `true` - converts multiple arguments to an array\n - `false`- always use the first argument\n - `Array` - converts multiple arguments to an object with keys provided in `options.multiArgs`\n\n- Turn async functions into promises\n\n```js\nvar thenify = require('thenify');\n\nvar somethingAsync = thenify(function somethingAsync(a, b, c, callback) {\n callback(null, a, b, c);\n});\n```\n\n- Backward compatible with callback\n\n```js\nvar thenify = require('thenify');\n\nvar somethingAsync = thenify(function somethingAsync(a, b, c, callback) {\n callback(null, a, b, c);\n}, { withCallback: true });\n\n// somethingAsync(a, b, c).then(onFulfilled).catch(onRejected);\n// somethingAsync(a, b, c, function () {});\n```\n\nor use `thenify.withCallback()`\n\n```js\nvar thenify = require('thenify').withCallback;\n\nvar somethingAsync = thenify(function somethingAsync(a, b, c, callback) {\n callback(null, a, b, c);\n});\n\n// somethingAsync(a, b, c).then(onFulfilled).catch(onRejected);\n// somethingAsync(a, b, c, function () {});\n```\n\n- Always return the first argument in callback\n\n```js\nvar thenify = require('thenify');\n\nvar promise = thenify(function (callback) {\n callback(null, 1, 2, 3);\n}, { multiArgs: false });\n\n// promise().then(function onFulfilled(value) {\n// assert.equal(value, 1);\n// });\n```\n\n- Converts callback arguments to an object\n\n```js\nvar thenify = require('thenify');\n\nvar promise = thenify(function (callback) {\n callback(null, 1, 2, 3);\n}, { multiArgs: [ 'one', 'tow', 'three' ] });\n\n// promise().then(function onFulfilled(value) {\n// assert.deepEqual(value, {\n// one: 1,\n// tow: 2,\n// three: 3\n// });\n// });\n```\n\n[gitter-image]: https://badges.gitter.im/thenables/thenify.png\n[gitter-url]: https://gitter.im/thenables/thenify\n[npm-image]: https://img.shields.io/npm/v/thenify.svg?style=flat-square\n[npm-url]: https://npmjs.org/package/thenify\n[github-tag]: http://img.shields.io/github/tag/thenables/thenify.svg?style=flat-square\n[github-url]: https://github.com/thenables/thenify/tags\n[travis-image]: https://img.shields.io/travis/thenables/thenify.svg?style=flat-square\n[travis-url]: https://travis-ci.org/thenables/thenify\n[coveralls-image]: https://img.shields.io/coveralls/thenables/thenify.svg?style=flat-square\n[coveralls-url]: https://coveralls.io/r/thenables/thenify\n[david-image]: http://img.shields.io/david/thenables/thenify.svg?style=flat-square\n[david-url]: https://david-dm.org/thenables/thenify\n[license-image]: http://img.shields.io/npm/l/thenify.svg?style=flat-square\n[license-url]: LICENSE\n[downloads-image]: http://img.shields.io/npm/dm/thenify.svg?style=flat-square\n[downloads-url]: https://npmjs.org/package/thenify\n","maintainers":[{"email":"dead_horse@qq.com","name":"dead_horse"},{"email":"dead_horse@qq.com","name":"dead-horse"},{"email":"jonathanrichardong@gmail.com","name":"jongleberry"}],"time":{"modified":"2022-06-27T06:03:49.795Z","created":"2014-08-09T23:34:21.073Z","1.0.0":"2014-08-09T23:34:21.073Z","2.0.0":"2014-12-17T06:23:24.197Z","3.0.0":"2014-12-25T08:18:14.350Z","3.1.0":"2015-01-06T03:32:20.600Z","3.1.1":"2015-10-20T18:22:01.954Z","3.2.0":"2016-02-01T20:29:26.986Z","3.2.1":"2016-10-10T10:48:16.435Z","3.3.0":"2017-05-19T09:58:32.296Z","3.3.1":"2020-06-17T17:30:57.152Z"},"homepage":"https://github.com/thenables/thenify#readme","keywords":["promisify","promise","thenify","then","es6"],"repository":{"type":"git","url":"git+https://github.com/thenables/thenify.git"},"author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"bugs":{"url":"https://github.com/thenables/thenify/issues"},"license":"MIT","readmeFilename":"README.md","users":{"shumkov":true,"icflorescu":true,"brooksn":true,"moimikey":true,"sylchamber":true,"tobiasnickel":true,"nickeltobias":true,"david-ruzicka":true,"cljames":true,"jochemstoel":true,"zhangaz1":true}}