{"name":"promise-make-naked","repository":{"type":"git","url":"git+https://github.com/fabiospampinato/promise-make-naked.git"},"description":"A simple function that makes a promise that can be resolved or rejected from the outside.","version":"2.1.1","type":"module","main":"dist/index.js","exports":"./dist/index.js","types":"./dist/index.d.ts","scripts":{"clean":"tsex clean","compile":"tsex compile","compile:watch":"tsex compile --watch","test":"tsex test","test:watch":"tsex test --watch","prepublishOnly":"tsex prepare"},"keywords":["promise","naked"],"devDependencies":{"fava":"^0.2.0","tsex":"^3.0.1","typescript":"^5.1.6"},"gitHead":"644e61257f96f789909f48b3e8a2b68672805fb1","bugs":{"url":"https://github.com/fabiospampinato/promise-make-naked/issues"},"homepage":"https://github.com/fabiospampinato/promise-make-naked#readme","_id":"promise-make-naked@2.1.1","_nodeVersion":"18.12.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-BLvgZSNRkQNM5RGL4Cz8wK76WSb+t3VeMJL+/kxRBHI5+nliqZezranGGtiu/ePeFo5+CaLRvvGMzXrBuu2tAA==","shasum":"8a2a75d9736d1ac11d9c63bf2acd22f2453eea84","tarball":"http://registry-npm.ywwl.com/promise-make-naked/download/promise-make-naked-2.1.1.tgz","fileCount":15,"unpackedSize":8680,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDV6F6okpdaEStMVANbgfGflRvu/ITt08oRFlqteLWsHQIgRU7zSrg9z9eCmnm1OElT1r+YEwEMeeFr7GYddKbXIbk="}],"size":3022,"noattachment":false,"key":"/promise-make-naked/-/promise-make-naked-2.1.1.tgz"},"_npmUser":{"name":"fabiospampinato","email":"spampinabio@gmail.com"},"directories":{},"maintainers":[{"name":"fabiospampinato","email":"spampinabio@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/promise-make-naked_2.1.1_1691759191878_0.8954510102444033"},"_hasShrinkwrap":false,"readme":"# Promise Make Naked\n\nA simple function that makes a promise that can be resolved or rejected from the outside.\n\n## Install\n\n```sh\nnpm install --save promise-make-naked\n```\n\n## Usage\n\n```ts\nimport makeNakedPromise from 'promise-make-naked';\n\n// Let's create a naked Promise\n\nconst {promise, resolve, reject, isPending, isResolved, isRejected} = makeNakedPromise ();\n\nresolve ( 123 ); // Resolve the promise with the provided value\nreject ( new Error () ); // Reject the promise with the provided reason\n\nisPending (); // Check if promise is still pending\nisResolved (); // Check if the promise got resolved\nisRejected (); // Check if the promise got rejected\n\n// Let's create a naked Promise similarly to how a normal Promise is created\n\nconst result = makeNakedPromise.wrap ( ({ promise, resolve, reject, isPending, isResolved, isRejected }) => {\n\n  resolve ( 123 );\n\n});\n```\n\n## License\n\nMIT © Fabio Spampinato\n","publish_time":1691759192072,"_cnpm_publish_time":1691759192072,"dist-tags":{"latest":"3.0.2"}}