{"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.2","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"},"_id":"promise-make-naked@2.1.2","gitHead":"43e57f4da00615588609082729885bd752be9fa3","bugs":{"url":"https://github.com/fabiospampinato/promise-make-naked/issues"},"homepage":"https://github.com/fabiospampinato/promise-make-naked#readme","_nodeVersion":"18.19.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-y7s8ZuHIG56JYspB24be9GFkXA1zXL85Ur9u1DKrW/tvyUoPxWgBjnalK6Nc6l7wHBcAW0c3PO07+XOsWTRuhg==","shasum":"8582f88893fd14b590c5552f4e3bd3deb5a18613","tarball":"http://registry-npm.ywwl.com/promise-make-naked/download/promise-make-naked-2.1.2.tgz","fileCount":15,"unpackedSize":8726,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA0lL3Z0b53YUWx/YqZ2Rq2LVkIXR4LoX7R63tUlzTJnAiBS8pRqWiSD5mzPelpu4c86V3aMiYipqG1YidviFh84pw=="}],"size":3058,"noattachment":false,"key":"/promise-make-naked/-/promise-make-naked-2.1.2.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.2_1712271893502_0.506072752139674"},"_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":1712271893714,"_cnpm_publish_time":1712271893714,"dist-tags":{"latest":"3.0.2"}}