{"_id":"p-from-callback","_rev":"5-c0274f81176dae041952502abea5526e","name":"p-from-callback","dist-tags":{"latest":"4.0.0"},"versions":{"1.0.0":{"name":"p-from-callback","version":"1.0.0","keywords":["promises","callbacks"],"author":{"name":"Julian Grinblat","email":"julian@dotcore.co.il"},"license":"SEE LICENSE IN LICENSE.md","_id":"p-from-callback@1.0.0","maintainers":[{"name":"perrin4869","email":"julian@dotcore.co.il"}],"homepage":"https://github.com/dotcore64/p-from-callback#readme","bugs":{"url":"https://github.com/dotcore64/p-from-callback/issues"},"dist":{"shasum":"33d057b8916884c294f574c50ad5750e57e32c10","tarball":"https://registry.npmjs.org/p-from-callback/-/p-from-callback-1.0.0.tgz","fileCount":5,"integrity":"sha512-loR7OeICbyTMmrjp54F/OBbmqsWKYlAZpGxh9h9n+ntPS+vjTM/JM20N5hjCOhgeHbFJ3f3XhFbtdrE3l+un2g==","signatures":[{"sig":"MEUCIQCXAgZk4DBbK9+bGu+ltuobu5+WY8UcBbaDESnCXcxs2QIgdVrINCdmQ+MPv1NACaStTri1wFuwgKPnHmoV1y26f0g=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":4695,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJigcDMACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqT7w/5ASq+Nav/DywBlSaTxBlxaF+K9rQdXshgMmD0IbibR3o6lE+Q\r\nkmNISyt1JKLv1DERjxjrOR7mcMx9XypLuieE8Qha18f7HSTYnXl+dmw2k9JF\r\nG5o0+W48nIxb/V9qwkSM4WB+MN9KaZIWpUAGboBhZ+VkorhShll6ef19Tmje\r\n4UvpOK2RsRRyCybE9AnidKTiLl7ut1HjC1qBSYDGKJK2AxoKICQeYryp/8Cv\r\nNce6dhZ6rVGYwwuD6thvPpjiMWlXc/s5Py3dif3QmuOm85RW7Qxv/E+3VhAE\r\nhM37gGnPs04z7RDD4w6LqHddSCUaa/irEhjXccyl2I6mAsF+uTxKorREB9Qz\r\nZZ3kvnoacjT4iQ9iASpfChW0OLiiVh0gXAYopIFndavyj3v1xtwRVU3a2Yzo\r\n0kz9s7IB/+qU5i5g0iobdKYaucZ3186CQCYUtf52guoMTk8qXGkaQx9d1bw7\r\nZ7MxFXLxwoABnqtk2Kz74V64cvwsndqfBDqFSV9QsJ+KO4b/wesPmvJz7XB+\r\nbTva978ywyEW1aGkJj2vLlBGBKSzL9bWxkRe402q6qeZ2igUk3/rK2Qc7jBu\r\nlcmDxYZ7HIrOMEiCVLn4SMlkSqxtDEQ98UoMgwweYdahsm4cR3LaKe0hR1ex\r\nRYGcxknyDn59YDbFLxskmhVhIftpDmNlVns=\r\n=M4Sq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","type":"module","types":"index.d.ts","engines":{"node":">=14.0"},"exports":{".":{"types":"./index.d.ts","default":"./index.js"},"./package.json":"./package.json"},"gitHead":"fb5e66a3b3e70e4e64f7b98565a15d001028ae5d","scripts":{"lint":"eslint --cache .","test":"mocha","cover":"c8 npm test","types":"tsc"},"_npmUser":{"name":"perrin4869","email":"julian@dotcore.co.il"},"repository":{"url":"git+https://github.com/dotcore64/p-from-callback.git","type":"git"},"_npmVersion":"8.5.5","description":"Map a callback to a promise","directories":{},"_nodeVersion":"16.15.0","_hasShrinkwrap":false,"devDependencies":{"c8":"^7.11.2","chai":"^4.3.6","mocha":"^10.0.0","eslint":"^8.15.0","typescript":"^4.7.1-rc","chai-as-promised":"^7.1.1","eslint-plugin-node":"^11.1.0","eslint-plugin-mocha":"^10.0.4","eslint-plugin-import":"^2.26.0","eslint-plugin-unicorn":"^42.0.0","@typescript-eslint/parser":"^5.23.0","eslint-config-airbnb-base":"^15.0.0","@typescript-eslint/eslint-plugin":"^5.23.0"},"_npmOperationalInternal":{"tmp":"tmp/p-from-callback_1.0.0_1652670667894_0.14345889240018606","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"p-from-callback","version":"1.0.1","keywords":["promises","callbacks"],"author":{"name":"Julian Grinblat","email":"julian@dotcore.co.il"},"license":"SEE LICENSE IN LICENSE.md","_id":"p-from-callback@1.0.1","maintainers":[{"name":"perrin4869","email":"julian@dotcore.co.il"}],"homepage":"https://github.com/dotcore64/p-from-callback#readme","bugs":{"url":"https://github.com/dotcore64/p-from-callback/issues"},"dist":{"shasum":"c437884511098ea8db0ef08540f11eb39b79930e","tarball":"https://registry.npmjs.org/p-from-callback/-/p-from-callback-1.0.1.tgz","fileCount":5,"integrity":"sha512-5N3Xj5tWR7giRLxF1qz1+bOAHNZFuiszG4H0f0dhbGCWxX72OQuJSuwnMv+ZT0qWcUKdkh7X0tu8Z2FALiM8pw==","signatures":[{"sig":"MEUCIG6Pl7Ab+k3qJoSh4RW8EkHNTe7qlHViPryYkJgpkKy0AiEAzw4jUH0tcyP40rufTzrhA+UKi/boJO8a/oZVegqii1I=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":4803,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj2hQnACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmow3w/+KTPkAS47/phTFvLWiW9LbptJ7CnKuyXEBXINWGB9pb+4m2Cq\r\nDHZaN3G4osVxVqAhtHSFuDXHVsVD9z7JTFgCwyx+gV8z8igKXCCP2Xg+wYUz\r\n61SFGKbMo+7G9y0vKhzr3dTb2GauVeU2BURHrmq9lW7tGP2xovPS8te1Td9D\r\nVjZqEsb4vPVzXfRz3D7e3RMnx+Amca5hgGvmc0kaxF8J7P6nWtg+3Ac7O0vb\r\nBNdRi+b+Km/AtuDyoZ2TOeEyyOgL/LutldZHg+jozpOZcjdMg+bBHQB7fg4K\r\ngOlX8gNKU3ua/1n7RD3FL2S1KeW2mDP0a/yfvRTbIf5NR3ooSPPz0Ekbpw9J\r\n+Xv4i7AAq8SyoV88aP6xvtWPPPP/t3Jy10S2nGeVfLIewx32jfjlsRidWLSE\r\nldSs7egS0/ey3KOhJpSAL9oggJXlX+Rlrd5gzdvzwaXXFGYQLzwXytHMVZHk\r\nkErvqLci6Iht6nYTIgngAqMj/Rjhhpk8yBqmxXI4KmJF5ZUvoxOC4ImAVUYV\r\nzmIypxSdoNJKGkVCd8dZO5uTE++FHPkfNxOFktEb8//RkPFqwSXiBrXVzACG\r\nqs1Mw8VJCqTMHXzigzxLKZals/nwamNafaGVnaTFlRRzA/TXK1uMLnPs/YJ7\r\n2XPfNvQbf5iDOQnfXUWMyXYaeVpDKkKzRWI=\r\n=ExzK\r\n-----END PGP SIGNATURE-----\r\n"},"type":"module","types":"index.d.ts","engines":{"node":">=14.0"},"exports":{".":{"types":"./index.d.ts","default":"./index.js"},"./package.json":"./package.json"},"gitHead":"376e49e0cddeaf8e327759aba32d2a59fa5fbff4","scripts":{"lint":"eslint --cache .","test":"mocha","cover":"c8 npm test","types":"tsd"},"_npmUser":{"name":"perrin4869","email":"julian@dotcore.co.il"},"repository":{"url":"git+https://github.com/dotcore64/p-from-callback.git","type":"git"},"_npmVersion":"8.19.3","description":"Map a callback to a promise","directories":{},"_nodeVersion":"16.19.0","_hasShrinkwrap":false,"devDependencies":{"c8":"^7.12.0","tsd":"^0.25.0","chai":"^4.3.7","mocha":"^10.2.0","eslint":"^8.33.0","typescript":"^4.9.5","eslint-plugin-n":"^15.6.1","chai-as-promised":"^7.1.1","eslint-plugin-mocha":"^10.1.0","eslint-plugin-import":"^2.27.5","eslint-plugin-unicorn":"^45.0.2","@typescript-eslint/parser":"^5.50.0","eslint-config-airbnb-base":"^15.0.0","eslint-plugin-eslint-comments":"^3.2.0","@typescript-eslint/eslint-plugin":"^5.50.0","eslint-import-resolver-typescript":"^3.5.3"},"_npmOperationalInternal":{"tmp":"tmp/p-from-callback_1.0.1_1675236391006_0.7583944786017853","host":"s3://npm-registry-packages"}},"2.0.0":{"name":"p-from-callback","version":"2.0.0","keywords":["promises","callbacks"],"author":{"name":"Julian Grinblat","email":"julian@dotcore.co.il"},"license":"SEE LICENSE IN LICENSE.md","_id":"p-from-callback@2.0.0","maintainers":[{"name":"perrin4869","email":"julian@dotcore.co.il"}],"homepage":"https://github.com/dotcore64/p-from-callback#readme","bugs":{"url":"https://github.com/dotcore64/p-from-callback/issues"},"dist":{"shasum":"045e8ffbcdb0acdf73ff8a079e164449bb7ead85","tarball":"https://registry.npmjs.org/p-from-callback/-/p-from-callback-2.0.0.tgz","fileCount":5,"integrity":"sha512-0gjkaVoLeg71VE4L7lccq8VPGEpZrVpDsS0s+sk6k3lQUVh9QYQPSog7a/Km407vzQt8zS9MoUMG4EgML//k2Q==","signatures":[{"sig":"MEUCIQD3Gai2gqj/UVlhC/RcPZHVPrNA0BFrj8hMdv1futk7HgIgCeT+MEeTvFMDJNBLlD6HNITN7qZ+2BaoBEDANPeYlcM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":4819},"type":"module","types":"index.d.ts","engines":{"node":">=18.0"},"exports":{".":{"types":"./index.d.ts","default":"./index.js"},"./package.json":"./package.json"},"gitHead":"bbe0f10228fc78610832409dde5e4d9e9d744cdd","scripts":{"lint":"eslint --cache .","test":"mocha","cover":"c8 npm test","types":"tsd"},"_npmUser":{"name":"perrin4869","email":"julian@dotcore.co.il"},"repository":{"url":"git+https://github.com/dotcore64/p-from-callback.git","type":"git"},"_npmVersion":"10.5.0","description":"Map a callback to a promise","directories":{},"_nodeVersion":"18.20.2","_hasShrinkwrap":false,"devDependencies":{"c8":"^9.1.0","tsd":"^0.31.0","chai":"^4.3.10","mocha":"^10.4.0","eslint":"^8.57.0","typescript":"^5.4.5","eslint-plugin-n":"^17.4.0","chai-as-promised":"^7.1.1","eslint-plugin-mocha":"^10.4.3","eslint-plugin-import":"^2.29.1","eslint-plugin-unicorn":"^52.0.0","@typescript-eslint/parser":"^7.8.0","eslint-config-airbnb-base":"^15.0.0","@typescript-eslint/eslint-plugin":"^7.8.0","eslint-import-resolver-typescript":"^3.6.1","@eslint-community/eslint-plugin-eslint-comments":"^4.3.0"},"_npmOperationalInternal":{"tmp":"tmp/p-from-callback_2.0.0_1714577942249_0.4281669105915531","host":"s3://npm-registry-packages"}},"3.0.0":{"name":"p-from-callback","version":"3.0.0","keywords":["promises","callbacks"],"author":{"name":"Julian Grinblat","email":"julian@dotcore.co.il"},"license":"SEE LICENSE IN LICENSE.md","_id":"p-from-callback@3.0.0","maintainers":[{"name":"perrin4869","email":"julian@dotcore.co.il"}],"homepage":"https://github.com/dotcore64/p-from-callback#readme","bugs":{"url":"https://github.com/dotcore64/p-from-callback/issues"},"dist":{"shasum":"a60a3ab8ed80a78844ea8ea4d7650d8fe1f29b17","tarball":"https://registry.npmjs.org/p-from-callback/-/p-from-callback-3.0.0.tgz","fileCount":5,"integrity":"sha512-ZkhRnvT4oY6f6XTb6wx07+Sw9NKQP9eguSh79rnPsyoB3pEDFjXle+Yu8Bd05OeqnjTyi54LsrHm3idZwpNDLA==","signatures":[{"sig":"MEYCIQDJ0r5kJahGyKLM8ETaiPCjNnfSiixOYxLNdlFO4mxYJwIhANG1IQy5C9UyPRIRaT2J+tEwGO/qrSSOEYDFf3biPbsX","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/p-from-callback@3.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":4822},"type":"module","types":"index.d.ts","engines":{"node":">=20.0"},"exports":{".":{"types":"./index.d.ts","default":"./index.js"},"./package.json":"./package.json"},"gitHead":"bcdfc89569e37311f1411735fc42faaff4099b44","scripts":{"lint":"eslint --cache .","test":"mocha","cover":"c8 npm test","types":"tsd"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:3dc73877-6103-4c68-89fe-6539ed087619"}},"repository":{"url":"git+https://github.com/dotcore64/p-from-callback.git","type":"git"},"_npmVersion":"11.6.1","description":"Map a callback to a promise","directories":{},"_nodeVersion":"24.11.0","_hasShrinkwrap":false,"devDependencies":{"c8":"^10.1.3","tsd":"^0.33.0","chai":"^6.2.0","mocha":"^11.7.4","eslint":"^8.57.0","typescript":"^5.9.3","eslint-plugin-n":"^17.23.1","chai-as-promised":"^8.0.2","eslint-plugin-mocha":"^10.5.0","eslint-plugin-import":"^2.32.0","eslint-plugin-unicorn":"^56.0.1","@typescript-eslint/parser":"^8.31.1","eslint-config-airbnb-base":"^15.0.0","@typescript-eslint/eslint-plugin":"^8.46.2","eslint-import-resolver-typescript":"^4.4.4","@eslint-community/eslint-plugin-eslint-comments":"^4.5.0"},"_npmOperationalInternal":{"tmp":"tmp/p-from-callback_3.0.0_1762016894983_0.8153592172034132","host":"s3://npm-registry-packages-npm-production"}},"4.0.0":{"name":"p-from-callback","version":"4.0.0","description":"Map a callback to a promise","type":"module","types":"index.d.ts","exports":{".":{"types":"./index.d.ts","default":"./index.js"},"./package.json":"./package.json"},"engines":{"node":">=22"},"scripts":{"lint":"eslint --cache .","types":"tsd","test":"node --test --import ./test/setup.js","cover":"c8 npm test"},"repository":{"type":"git","url":"git+https://github.com/dotcore64/p-from-callback.git"},"keywords":["promises","callbacks"],"author":{"name":"Julian Grinblat","email":"julian@dotcore.co.il"},"license":"SEE LICENSE IN LICENSE.md","bugs":{"url":"https://github.com/dotcore64/p-from-callback/issues"},"homepage":"https://github.com/dotcore64/p-from-callback#readme","devDependencies":{"@eslint-community/eslint-plugin-eslint-comments":"^4.7.2","@eslint/js":"^9.39.4","c8":"^11.0.0","chai":"^6.2.2","chai-as-promised":"^8.0.2","eslint":"^9.39.4","eslint-config-prettier":"^10.1.8","eslint-import-resolver-typescript":"^4.4.4","eslint-plugin-import":"^2.32.0","eslint-plugin-mocha":"^11.3.0","eslint-plugin-n":"^18.0.1","eslint-plugin-prettier":"^5.5.6","eslint-plugin-unicorn":"^64.0.0","prettier":"3.8.3","tsd":"^0.33.0","typescript":"^5.9.3","typescript-eslint":"^8.60.0"},"gitHead":"ed8904c4668eb5ba5149e98b42ace912b9057a73","_id":"p-from-callback@4.0.0","_nodeVersion":"24.16.0","_npmVersion":"11.13.0","dist":{"integrity":"sha512-I6dN8mjScLKuoUiJe4PL2Wk4xMOarSNaAudq3nn9eGAmdhePKG6+HqzmbyIvLOrlIky+fQk4EkcxH+qgNMVUpA==","shasum":"2d28fb49778ff37dea122550b0fb3025c9bf51b4","tarball":"https://registry.npmjs.org/p-from-callback/-/p-from-callback-4.0.0.tgz","fileCount":5,"unpackedSize":4802,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/p-from-callback@4.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDF5A5kkkyUUlQ08i9FqBUlXL6UDJ40pVxvB7UOYzVlawIgYaSqszCAzxBAnEF4cgowMnIjPwb12A9ctSwn8+5hEm4="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:3dc73877-6103-4c68-89fe-6539ed087619"}},"directories":{},"maintainers":[{"name":"perrin4869","email":"julian@dotcore.co.il"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/p-from-callback_4.0.0_1781849224861_0.4554057754755665"},"_hasShrinkwrap":false}},"time":{"created":"2022-05-16T03:11:07.893Z","modified":"2026-06-19T06:07:05.280Z","1.0.0":"2022-05-16T03:11:08.030Z","1.0.1":"2023-02-01T07:26:31.176Z","2.0.0":"2024-05-01T15:39:02.483Z","3.0.0":"2025-11-01T17:08:15.222Z","4.0.0":"2026-06-19T06:07:05.013Z"},"bugs":{"url":"https://github.com/dotcore64/p-from-callback/issues"},"author":{"name":"Julian Grinblat","email":"julian@dotcore.co.il"},"license":"SEE LICENSE IN LICENSE.md","homepage":"https://github.com/dotcore64/p-from-callback#readme","keywords":["promises","callbacks"],"repository":{"type":"git","url":"git+https://github.com/dotcore64/p-from-callback.git"},"description":"Map a callback to a promise","maintainers":[{"name":"perrin4869","email":"julian@dotcore.co.il"}],"readme":"# p-from-callback\n\n[![Build Status][build-badge]][build]\n[![npm package][npm-badge]][npm]\n[![Coverage Status][coveralls-badge]][coveralls]\n\n> Map node-style callback to a promise\n\n## Install\n\n```\n$ npm install p-from-callback\n```\n\n## Features\n\n* pure esm module\n* typescript types\n* supports multiple return values\n* 100% test coverage\n\n## Usage\n\n```js\nimport { readFile } from 'node:fs';\nimport fromCallback from 'p-from-callback';\n\nfromCallback(cb => readFile(\"foo.txt\", cb)).then(buf => buf.toString('utf8'));\nfromCallback(cb => cb(undefined, \"foo\", \"bar\"), true)\n    .then([foo, bar] => foo === \"foo\" && bar === \"bar\");\n```\n\n## API\n\n#### fromCallback\\<R\\>((cb: (err: unknown, res: R)): unknown): Promise\\<R\\>\n#### fromCallback\\<R\\>((cb: (err: unknown, ...res: R[])): unknown, true): Promise\\<R[]\\>\n\nTakes a callback resolver and returns a promise to the resolved value, or array of values when `multi = true`.\n\n## License\n\nSee the [LICENSE](LICENSE.md) file for license rights and limitations (MIT).\n\n[build-badge]: https://img.shields.io/github/actions/workflow/status/dotcore64/p-from-callback/test.yml?event=push&style=flat-square\n[build]: https://github.com/dotcore64/p-from-callback/actions\n\n[npm-badge]: https://img.shields.io/npm/v/p-from-callback.svg?style=flat-square\n[npm]: https://www.npmjs.org/package/p-from-callback\n\n[coveralls-badge]: https://img.shields.io/coveralls/dotcore64/p-from-callback/master.svg?style=flat-square\n[coveralls]: https://coveralls.io/r/dotcore64/p-from-callback\n","readmeFilename":"README.md"}