{"_id":"promise-make-naked","_rev":"298487","name":"promise-make-naked","description":"A simple function that makes a promise that can be resolved or rejected from the outside.","dist-tags":{"latest":"2.1.1"},"maintainers":[{"name":"fabiospampinato","email":""}],"time":{"modified":"2024-01-15T13:43:37.000Z","created":"2021-03-26T15:43:44.192Z","2.1.1":"2023-08-11T13:06:32.072Z","2.1.0":"2023-08-11T11:37:55.046Z","2.0.0":"2022-04-07T19:14:02.835Z","1.0.0":"2021-03-26T15:43:44.192Z"},"users":{},"repository":{"type":"git","url":"git+https://github.com/fabiospampinato/promise-make-naked.git"},"versions":{"2.1.1":{"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":{"shasum":"8a2a75d9736d1ac11d9c63bf2acd22f2453eea84","size":3022,"noattachment":false,"key":"/promise-make-naked/-/promise-make-naked-2.1.1.tgz","tarball":"http://name.csiicloud.com:7001/promise-make-naked/download/promise-make-naked-2.1.1.tgz"},"_npmUser":{"name":"fabiospampinato","email":"spampinabio@gmail.com"},"directories":{},"maintainers":[{"name":"fabiospampinato","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/promise-make-naked_2.1.1_1691759191878_0.8954510102444033"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-08-11T13:06:32.072Z","publish_time":1691759192072,"_source_registry_name":"default","_cnpm_publish_time":1691759192072},"2.1.0":{"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.0","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":"f133bf0494fb1d23f8b200fb10e59ab6e3a5ec4c","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.0","_nodeVersion":"18.12.0","_npmVersion":"8.19.2","dist":{"shasum":"3cdf8c4c283518631a2386ce04f388b0403b454b","size":2978,"noattachment":false,"key":"/promise-make-naked/-/promise-make-naked-2.1.0.tgz","tarball":"http://name.csiicloud.com:7001/promise-make-naked/download/promise-make-naked-2.1.0.tgz"},"_npmUser":{"name":"fabiospampinato","email":"spampinabio@gmail.com"},"directories":{},"maintainers":[{"name":"fabiospampinato","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/promise-make-naked_2.1.0_1691753874863_0.6081215562323683"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-08-11T11:37:55.046Z","publish_time":1691753875046,"_source_registry_name":"default","_cnpm_publish_time":1691753875046},"2.0.0":{"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.0.0","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":"npm run clean && npm run compile && npm run test"},"keywords":["promise","naked"],"devDependencies":{"fava":"^0.0.6","tsex":"^1.1.0","typescript":"^4.6.3"},"gitHead":"011351cd65b10083f57d42a923ff5d5383add465","bugs":{"url":"https://github.com/fabiospampinato/promise-make-naked/issues"},"homepage":"https://github.com/fabiospampinato/promise-make-naked#readme","_id":"promise-make-naked@2.0.0","_nodeVersion":"16.13.0","_npmVersion":"8.1.0","dist":{"shasum":"4f65db7da5cd4ba6581a598d9e7f0f6bf5a3ed83","size":2312,"noattachment":false,"key":"/promise-make-naked/-/promise-make-naked-2.0.0.tgz","tarball":"http://name.csiicloud.com:7001/promise-make-naked/download/promise-make-naked-2.0.0.tgz"},"_npmUser":{"name":"fabiospampinato","email":"spampinabio@gmail.com"},"directories":{},"maintainers":[{"name":"fabiospampinato","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/promise-make-naked_2.0.0_1649358842637_0.8263977543365131"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-04-07T19:28:21.494Z","publish_time":1649358842835,"_cnpm_publish_time":1649358842835},"1.0.0":{"name":"promise-make-naked","description":"A simple function that makes a promise that can be resolved or rejected from the outside.","version":"1.0.0","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"clean":"rimraf dist","compile":"tsc --skipLibCheck && tstei","compile:watch":"tsc --skipLibCheck --watch","prepublishOnly":"npm run clean && npm run compile"},"bugs":{"url":"https://github.com/fabiospampinato/promise-make-naked/issues"},"license":"MIT","author":{"name":"Fabio Spampinato","email":"spampinabio@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/fabiospampinato/promise-make-naked.git"},"keywords":["promise","naked"],"dependencies":{},"devDependencies":{"rimraf":"^3.0.0","typescript":"^3.5.3","typescript-transform-export-interop":"^1.0.2"},"gitHead":"fcc01cf47abab6772add1e0269edbe57952924e1","homepage":"https://github.com/fabiospampinato/promise-make-naked#readme","_id":"promise-make-naked@1.0.0","_npmVersion":"6.4.1","_nodeVersion":"8.4.0","_npmUser":{"name":"fabiospampinato","email":"spampinabio@gmail.com"},"dist":{"shasum":"00fc488b6624972025a98f6906ec4eda2b31e9dd","size":2737,"noattachment":false,"key":"/promise-make-naked/-/promise-make-naked-1.0.0.tgz","tarball":"http://name.csiicloud.com:7001/promise-make-naked/download/promise-make-naked-1.0.0.tgz"},"directories":{},"maintainers":[{"name":"fabiospampinato","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/promise-make-naked_1.0.0_1616773424071_0.7160971039461068"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-27T08:39:51.200Z","publish_time":1616773424192,"_cnpm_publish_time":1616773424192}},"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","_attachments":{},"homepage":"https://github.com/fabiospampinato/promise-make-naked#readme","bugs":{"url":"https://github.com/fabiospampinato/promise-make-naked/issues"}}