{"_id":"@ioredis/as-callback","_rev":"5-ddd4d1e3f3db8bcfc3e8876439144cbd","name":"@ioredis/as-callback","dist-tags":{"latest":"3.0.0"},"versions":{"3.0.0":{"name":"@ioredis/as-callback","version":"3.0.0","keywords":["ascallback","nodeify","promise","bluebird"],"author":{"url":"http://zihua.li","name":"Zihua Li","email":"i@zihua.li"},"license":"MIT","_id":"@ioredis/as-callback@3.0.0","maintainers":[{"name":"ioredis-robot","email":"ioredis-robot@zihua.li"},{"name":"luin","email":"i@zihua.li"}],"homepage":"https://github.com/ioredis/as-callback#readme","bugs":{"url":"https://github.com/ioredis/as-callback/issues"},"dist":{"shasum":"b96c9b05e6701e85ec6a5e62fa254071b0aec97f","tarball":"https://registry.npmjs.org/@ioredis/as-callback/-/as-callback-3.0.0.tgz","fileCount":9,"integrity":"sha512-Kqv1rZ3WbgOrS+hgzJ5xG5WQuhvzzSTRYvNeyPMLOAM78MHSnuKI20JeJGbpuAt//LCuP0vsexZcorqW7kWhJg==","signatures":[{"sig":"MEYCIQCFA0XVuWdWZaabsG/7XCuJAWavpZCTUA27cupXn0A9RwIhANXPqOXy2UPloMHTTAZ9q/frg0nesMWJwbBfVuobsOOg","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5958,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiNX9QACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoHmQ/+KQiJdS/H5sYLsy5fOdZLd9059WBduzBt2pa/yBJ5yR1QOCJG\r\nlRWTpysyFcv+Dc536LSvt30tGdklPPn+U5h+n5PVcNHqirDBygkKoJofvp0t\r\npB0lXlzycO0s/YSz/Hk/rpDtx27G1kQ0v6VpvuPv8VaQUGh6xaA6lRJ78BOv\r\nwqAstCouu/kll13s1p8STmvR00hlY/w948JTHf8bxRjBymbKX+UlfS4irAMF\r\nFT37gIgQMIzwGOLUanKDSmplUn7pJPH7840s1+UwToOjFCXTwoMLapKdoEZ8\r\nssQZ6fEEmnfIqKD72yHCNmNm58LEIZVLq3wiA+yP6z8KSlvHHjOIcADdSW8p\r\nCluSMaXB3lSKeF/J1ZStb2DkmT6/wIKAHg7wG9/1CkDb1YmxnWSKLRhg/FZf\r\njLDv3sWJnUfg69ROF0rNwVn6HoLFEdPt2xncFer+mP9fE2UElDy/t/2N5bMp\r\nwJLlm4zbc4PCXtjFiU8e4wToRYpar043sBkkgkVlUQMiZgQ65Up/zqcnKTHP\r\nZIgMlHNmDseW5Pg2hh7WBRj3rJx8TCV9BTfIwwNS9TPb8qkAYaVhkIvvD1r8\r\nPqfaS7PQNWv3nD1Ap8VeVyUSOpbVIUrZjztMklOGwUr2OSNxS6LVLHMwA2U0\r\nWlb4PJM6uFEBJTwOz0omu+aGzqqfuqZphiM=\r\n=hWMO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"built/index.js","types":"built/index.d.ts","gitHead":"5039d4dc40b98e527064f05a81e24bc299f5dce5","scripts":{"test":"npm run build && mocha","build":"rm -rf built && tsc","prepublishOnly":"npm test"},"_npmUser":{"name":"luin","email":"i@zihua.li"},"repository":{"url":"git+https://github.com/ioredis/as-callback.git","type":"git"},"_npmVersion":"6.14.16","description":"A performant and standard (Bluebird) library that registers a node-style callback on a promise","directories":{"lib":"built"},"_nodeVersion":"14.19.0","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"mocha":"^9.2.2","sinon":"^13.0.1","typescript":"^4.6.2","promise-timeout":"^1.3.0"},"_npmOperationalInternal":{"tmp":"tmp/as-callback_3.0.0_1647673168616_0.7282688474929084","host":"s3://npm-registry-packages"}}},"time":{"created":"2022-03-19T06:59:28.567Z","modified":"2025-09-17T15:29:48.349Z","3.0.0":"2022-03-19T06:59:28.761Z"},"bugs":{"url":"https://github.com/ioredis/as-callback/issues"},"author":{"url":"http://zihua.li","name":"Zihua Li","email":"i@zihua.li"},"license":"MIT","homepage":"https://github.com/ioredis/as-callback#readme","keywords":["ascallback","nodeify","promise","bluebird"],"repository":{"url":"git+https://github.com/ioredis/as-callback.git","type":"git"},"description":"A performant and standard (Bluebird) library that registers a node-style callback on a promise","maintainers":[{"email":"ioredis-robot@zihua.li","name":"ioredis-robot"},{"email":"david.maier@redis.com","name":"dmaier-redislabs"},{"email":"nkaradzhov89@gmail.com","name":"nkaradzhov"}],"readme":"# Standard asCallback\nA performant and standard (Bluebird) library that registers a node-style callback on a promise. It's used by [ioredis](https://github.com/luin/ioredis).\n\n[![Build Status](https://github.com/ioredis/as-callback/workflows/Test/badge.svg)](https://github.com/ioredis/as-callback/actions?query=workflow%3ATest+branch%3Amaster) [![npm latest version](https://img.shields.io/npm/v/@ioredis/as-callback/latest.svg)](https://www.npmjs.com/package/@ioredis/as-callback)\n\n\n## Install\n\n```\n$ npm install @ioredis/as-callback\n```\n\n## Usage\n\n```javascript\nconst asCallback = require('@ioredis/as-callback').defaults;\n\nconst promise = new Promise(function (resolve) {\n  setTimeout(function () {\n    resolve('hello world!')\n  }, 1000)\n})\n\nasCallback(promise, function callback (err, res) {\n  console.log(err, res) // null, 'hello world!'\n})\n```\n\n## Motivation\nThere are many libraries serve similar functionality. However, none of them I'd found are exactly the same as Bluebird's `asCallback` function (in terms of either performance or functionality). Thus this library comes out.\n\n## Thanks\n\nMost code of this library are ported from the awesome Bluebird library.\n\n## License\nThe MIT License.\n","readmeFilename":"README.md"}