{"_id":"is-actual-promise","_rev":"2-81ce586deb85f43007c6bac62be50b62","name":"is-actual-promise","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"is-actual-promise","version":"1.0.0","description":"Verify if something is a Promise","main":"./dist/cjs/index.js","module":"./dist/mjs/index.js","exports":{"./package.json":{"import":"./package.json","require":"./package.json"},".":{"import":{"types":"./dist/mjs/index.d.ts","default":"./dist/mjs/index.js"},"require":{"types":"./dist/cjs/index.d.ts","default":"./dist/cjs/index.js"}}},"scripts":{"preversion":"npm test","postversion":"npm publish","prepublishOnly":"git push origin --follow-tags","prepare":"tsc -p tsconfig/cjs.json && tsc -p tsconfig/esm.json && bash ./scripts/fixup.sh","pretest":"npm run prepare","presnap":"npm run prepare","test":"tap","snap":"tap","format":"prettier --write . --loglevel warn --ignore-path ../../.prettierignore --cache","typedoc":"typedoc --tsconfig tsconfig/esm.json ./src/*.ts"},"keywords":["is promise","is","type","check","isPromise"],"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"https://izs.me"},"license":"BlueOak-1.0.0","repository":{"type":"git","url":"git+https://github.com/isaacs/is-actual-promise.git"},"devDependencies":{"prettier":"^2.8.2","sync-content":"^1.0.2","tap":"^18.0.0-5","typedoc":"^0.24.8","typescript":"^5.1.6"},"prettier":{"semi":false,"printWidth":70,"tabWidth":2,"useTabs":false,"singleQuote":true,"jsxSingleQuote":false,"bracketSameLine":true,"arrowParens":"avoid","endOfLine":"lf"},"_id":"is-actual-promise@1.0.0","gitHead":"782fa5494e31627102ae5b04c79c7b9bb8c53064","types":"./dist/cjs/index.d.ts","bugs":{"url":"https://github.com/isaacs/is-actual-promise/issues"},"homepage":"https://github.com/isaacs/is-actual-promise#readme","_nodeVersion":"18.16.0","_npmVersion":"9.8.1","dist":{"integrity":"sha512-DWSmKTiEoY3Y9LGHG9TVnFgydCCu+3fLJi4rv3fpi0gL/lKoILekh/oF/nO3/Lq1l5Rqo+tQt5TWzxMmYIhWyg==","shasum":"e37fc4ff63ca149a02b61f0f015c5d46b8f605fd","tarball":"https://registry.npmjs.org/is-actual-promise/-/is-actual-promise-1.0.0.tgz","fileCount":12,"unpackedSize":5922,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHq8YkvHAXtjss+pe3rbj/hLwAYPDu/q1aEA0s7E337rAiAuQHOHliVJ/EbLL1GBvStHpYLdQZthn973lrPf1/FrDQ=="}]},"_npmUser":{"name":"isaacs","email":"i@izs.me"},"directories":{},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/is-actual-promise_1.0.0_1691298547524_0.6980255156344162"},"_hasShrinkwrap":false},"1.0.1":{"name":"is-actual-promise","version":"1.0.1","description":"Verify if something is a Promise","main":"./dist/commonjs/index.js","exports":{"./package.json":"./package.json",".":{"import":{"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/commonjs/index.d.ts","default":"./dist/commonjs/index.js"}}},"scripts":{"preversion":"npm test","postversion":"npm publish","prepublishOnly":"git push origin --follow-tags","prepare":"tshy","pretest":"npm run prepare","presnap":"npm run prepare","test":"tap","snap":"tap","format":"prettier --write . --loglevel warn --ignore-path ../../.prettierignore --cache","typedoc":"typedoc"},"keywords":["is promise","is","type","check","isPromise"],"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"https://izs.me"},"license":"BlueOak-1.0.0","repository":{"type":"git","url":"git+https://github.com/isaacs/is-actual-promise.git"},"devDependencies":{"pacote":"^17.0.3","prettier":"^2.8.2","sync-content":"^1.0.2","tap":"^18.5.3","typedoc":"^0.24.8","typescript":"^5.1.6"},"prettier":{"semi":false,"printWidth":70,"tabWidth":2,"useTabs":false,"singleQuote":true,"jsxSingleQuote":false,"bracketSameLine":true,"arrowParens":"avoid","endOfLine":"lf"},"dependencies":{"tshy":"^1.7.0"},"tshy":{"exports":{"./package.json":"./package.json",".":"./src/index.ts"}},"types":"./dist/commonjs/index.d.ts","type":"module","_id":"is-actual-promise@1.0.1","gitHead":"3202ae4aa9b1e2dd53141c0925f32cec9912ddb3","bugs":{"url":"https://github.com/isaacs/is-actual-promise/issues"},"homepage":"https://github.com/isaacs/is-actual-promise#readme","_nodeVersion":"20.8.0","_npmVersion":"10.1.0","dist":{"integrity":"sha512-PlsL4tNv62lx5yN2HSqaRSTgIpUAPW7U6+crVB8HfWm5161rZpeqWbl0ZSqH2MAfRKXWSZVPRNbE/r8qPcb13g==","shasum":"69ddeb85d9007d0b778c089845436891ba49c93c","tarball":"https://registry.npmjs.org/is-actual-promise/-/is-actual-promise-1.0.1.tgz","fileCount":13,"unpackedSize":7732,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG3+EM2Dw8cxyofNnMDkDOyDGB04FuLk7ZPBpTuogzG6AiEAoC0Qscz+1AdQDTbq00J+eWpYP9e/pF0PaEPquzo/xXg="}]},"_npmUser":{"name":"isaacs","email":"i@izs.me"},"directories":{},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/is-actual-promise_1.0.1_1698697411495_0.4419876416751889"},"_hasShrinkwrap":false},"1.0.2":{"name":"is-actual-promise","version":"1.0.2","description":"Verify if something is a Promise","main":"./dist/commonjs/index.js","exports":{"./package.json":"./package.json",".":{"import":{"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/commonjs/index.d.ts","default":"./dist/commonjs/index.js"}}},"scripts":{"preversion":"npm test","postversion":"npm publish","prepublishOnly":"git push origin --follow-tags","prepare":"tshy","pretest":"npm run prepare","presnap":"npm run prepare","test":"tap","snap":"tap","format":"prettier --write . --loglevel warn --ignore-path ../../.prettierignore --cache","typedoc":"typedoc"},"keywords":["is promise","is","type","check","isPromise"],"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"https://izs.me"},"license":"BlueOak-1.0.0","repository":{"type":"git","url":"git+https://github.com/isaacs/is-actual-promise.git"},"devDependencies":{"prettier":"^2.8.2","tap":"^18.5.3","tshy":"^1.14.0","typedoc":"^0.24.8","typescript":"^5.1.6"},"prettier":{"semi":false,"printWidth":70,"tabWidth":2,"useTabs":false,"singleQuote":true,"jsxSingleQuote":false,"bracketSameLine":true,"arrowParens":"avoid","endOfLine":"lf","experimentalTernaries":true},"tshy":{"exports":{"./package.json":"./package.json",".":"./src/index.ts"}},"types":"./dist/commonjs/index.d.ts","type":"module","_id":"is-actual-promise@1.0.2","gitHead":"7417895f5764b9b80e541f9f10acd983c086df17","bugs":{"url":"https://github.com/isaacs/is-actual-promise/issues"},"homepage":"https://github.com/isaacs/is-actual-promise#readme","_nodeVersion":"20.11.0","_npmVersion":"10.7.0","dist":{"integrity":"sha512-xsFiO1of0CLsQnPZ1iXHNTyR9YszOeWKYv+q6n8oSFW3ipooFJ1j1lbRMgiMCr+pp2gLruESI4zb5Ak6eK5OnQ==","shasum":"90b422555696d79e39a67ab36270e63bb61758c9","tarball":"https://registry.npmjs.org/is-actual-promise/-/is-actual-promise-1.0.2.tgz","fileCount":13,"unpackedSize":7689,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBQxddEOXgXvwTi+TpRCVnnpQ5v8QmkKCOmRUdQTYsC0AiAnDL39qbxYaRLBYJpWiXajizyeKdBdEQJT1/8t8iDG9w=="}]},"_npmUser":{"name":"isaacs","email":"i@izs.me"},"directories":{},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/is-actual-promise_1.0.2_1715709441796_0.4677636735745736"},"_hasShrinkwrap":false}},"time":{"created":"2023-08-06T05:09:07.467Z","1.0.0":"2023-08-06T05:09:07.681Z","modified":"2024-05-14T17:57:22.179Z","1.0.1":"2023-10-30T20:23:31.653Z","1.0.2":"2024-05-14T17:57:21.993Z"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"description":"Verify if something is a Promise","homepage":"https://github.com/isaacs/is-actual-promise#readme","keywords":["is promise","is","type","check","isPromise"],"repository":{"type":"git","url":"git+https://github.com/isaacs/is-actual-promise.git"},"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"https://izs.me"},"bugs":{"url":"https://github.com/isaacs/is-actual-promise/issues"},"license":"BlueOak-1.0.0","readme":"# is-actual-promise\n\nSimilar to [`p-is-promise`](https://npmjs.com/p-is-promise) and\n[`is-promise`](https://npmjs.com/is-promise), which are also both\nfine alternatives to this.\n\nDifferences (ie, \"why this thing then?\")\n\n* This module is hybrid, so it can be used in either commonjs or\n  esm. `is-promise` is hybrid, but `p-is-promise` is ESM-only.\n* This module asserts that the tested value supplies the full\n  actual `Promise` interface, not just `PromiseLike` (ie, it also\n  asserts `.catch()` and `.finally()`. (`p-is-promise` tests for\n  `.catch()`, neither tests for `.finally()`.)\n* This module provides a named export rather than a default\n  export, which is a bit less of a hassle in some scenarios.\n* This module does not verify the resolution type of the Promise,\n  since that cannot be determined or verified, only that it's a\n  `Promise<any | void>`.\n\n(Note that this module does _not_ verify that the `.catch()`,\n`.then()`, and `.finally()` methods return Promises, because that\nis impossible at run-time without actually calling them. No\nduck-typing method should ever be considered fully\nauthoritative.)\n\n## USAGE\n\n```ts\nimport { isPromise } from 'is-actual-promise'\n\nconsole.log(isPromise(new Promise(() => {}))) // true\nconsole.log(isPromise((async () => true)())) // true\nconsole.log(isPromise(Promise.resolve(true))) // true\nconsole.log(isPromise({\n  then: async () => 5,\n  finally: async () => {},\n  catch: () => {},\n})) // true, but not accurate, limitation of duck typing\n```\n","readmeFilename":"README.md"}