{"_id":"p-is-promise","_rev":"239523","name":"p-is-promise","description":"Check if something is a promise","dist-tags":{"latest":"4.0.0"},"maintainers":[{"name":"npm:sindresorhus","email":""},{"name":"sindresorhus","email":""}],"time":{"modified":"2023-03-24T16:55:35.000Z","created":"2016-11-26T08:27:15.923Z","4.0.0":"2021-04-16T07:02:34.848Z","3.0.0":"2019-07-01T16:12:23.648Z","2.1.0":"2019-04-06T11:57:48.017Z","2.0.0":"2018-09-24T09:17:36.896Z","1.1.0":"2016-11-28T05:40:20.274Z","1.0.0":"2016-11-26T08:27:15.923Z"},"users":{},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"repository":{"type":"git","url":"git+https://github.com/sindresorhus/p-is-promise.git"},"versions":{"4.0.0":{"name":"p-is-promise","version":"4.0.0","description":"Check if something is a promise","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/p-is-promise.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":"./index.js","engines":{"node":">=12"},"scripts":{"test":"xo && ava && tsd"},"keywords":["promise","is","detect","check","kind","type","thenable","es2015","async","await","promises","bluebird"],"devDependencies":{"ava":"^3.15.0","bluebird":"^3.7.2","tsd":"^0.14.0","xo":"^0.38.2"},"xo":{"rules":{"promise/prefer-await-to-then":"off"}},"gitHead":"e4ca18e2cdde865e0809b0e97e5803436918528d","bugs":{"url":"https://github.com/sindresorhus/p-is-promise/issues"},"homepage":"https://github.com/sindresorhus/p-is-promise#readme","_id":"p-is-promise@4.0.0","_nodeVersion":"14.16.1","_npmVersion":"6.14.10","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"479ef05c0577aafb62e807224cedf7484525134f","size":2063,"noattachment":false,"key":"/p-is-promise/-/p-is-promise-4.0.0.tgz","tarball":"http://name.csiicloud.com:7001/p-is-promise/download/p-is-promise-4.0.0.tgz"},"directories":{},"maintainers":[{"name":"npm:sindresorhus","email":""},{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/p-is-promise_4.0.0_1618556554692_0.9766552655543208"},"_hasShrinkwrap":false,"publish_time":1618556554848,"_cnpm_publish_time":1618556554848,"_cnpmcore_publish_time":"2021-12-14T06:45:56.340Z"},"3.0.0":{"name":"p-is-promise","version":"3.0.0","description":"Check if something is a promise","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/p-is-promise.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=8"},"scripts":{"test":"xo && ava && tsd"},"keywords":["promise","is","detect","check","kind","type","thenable","es2015","async","await","promises","bluebird"],"devDependencies":{"ava":"^2.1.0","bluebird":"^3.5.4","tsd":"^0.7.2","xo":"^0.24.0"},"xo":{"rules":{"promise/prefer-await-to-then":"off"}},"gitHead":"bb27245a9650c2ad91b6e23b9c683a8b4cb2509b","bugs":{"url":"https://github.com/sindresorhus/p-is-promise/issues"},"homepage":"https://github.com/sindresorhus/p-is-promise#readme","_id":"p-is-promise@3.0.0","_nodeVersion":"10.16.0","_npmVersion":"6.9.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"58e78c7dfe2e163cf2a04ff869e7c1dba64a5971","size":1850,"noattachment":false,"key":"/p-is-promise/-/p-is-promise-3.0.0.tgz","tarball":"http://name.csiicloud.com:7001/p-is-promise/download/p-is-promise-3.0.0.tgz"},"maintainers":[{"name":"npm:sindresorhus","email":""},{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/p-is-promise_3.0.0_1561997543520_0.9288862605672519"},"_hasShrinkwrap":false,"publish_time":1561997543648,"_cnpm_publish_time":1561997543648},"2.1.0":{"name":"p-is-promise","version":"2.1.0","description":"Check if something is a promise","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/p-is-promise.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=6"},"scripts":{"test":"xo && ava && tsd"},"keywords":["promise","is","detect","check","kind","type","thenable","es2015","async","await","promises","bluebird"],"devDependencies":{"ava":"^1.4.1","bluebird":"^3.5.4","tsd":"^0.7.2","xo":"^0.24.0"},"gitHead":"a265a233b3bbcad7ced3a11605c7ad16c59fe6ae","bugs":{"url":"https://github.com/sindresorhus/p-is-promise/issues"},"homepage":"https://github.com/sindresorhus/p-is-promise#readme","_id":"p-is-promise@2.1.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"918cebaea248a62cf7ffab8e3bca8c5f882fc42e","size":1937,"noattachment":false,"key":"/p-is-promise/-/p-is-promise-2.1.0.tgz","tarball":"http://name.csiicloud.com:7001/p-is-promise/download/p-is-promise-2.1.0.tgz"},"maintainers":[{"name":"npm:sindresorhus","email":""},{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/p-is-promise_2.1.0_1554551867873_0.050121990378975134"},"_hasShrinkwrap":false,"publish_time":1554551868017,"_cnpm_publish_time":1554551868017},"2.0.0":{"name":"p-is-promise","version":"2.0.0","description":"Check if something is a promise","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/p-is-promise.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=6"},"scripts":{"test":"xo && ava && tsd-check"},"keywords":["promise","is","detect","check","kind","type","thenable","es2015","async","await","promises","bluebird"],"devDependencies":{"ava":"^0.25.0","bluebird":"^3.4.6","tsd-check":"^0.2.1","xo":"^0.23.0"},"gitHead":"959b6f32892c494b57656bdba24e895057c9fbae","bugs":{"url":"https://github.com/sindresorhus/p-is-promise/issues"},"homepage":"https://github.com/sindresorhus/p-is-promise#readme","_id":"p-is-promise@2.0.0","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"7554e3d572109a87e1f3f53f6a7d85d1b194f4c5","size":1843,"noattachment":false,"key":"/p-is-promise/-/p-is-promise-2.0.0.tgz","tarball":"http://name.csiicloud.com:7001/p-is-promise/download/p-is-promise-2.0.0.tgz"},"maintainers":[{"name":"npm:sindresorhus","email":""},{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/p-is-promise_2.0.0_1537780656764_0.16366292883755174"},"_hasShrinkwrap":false,"publish_time":1537780656896,"_cnpm_publish_time":1537780656896},"1.1.0":{"name":"p-is-promise","version":"1.1.0","description":"Check if something is a promise","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/p-is-promise.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=4"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["promise","is","detect","check","kind","type","thenable","es2015","async","await","promises","bluebird"],"devDependencies":{"ava":"*","bluebird":"^3.4.6","xo":"*"},"xo":{"esnext":true},"gitHead":"4333abad2f82fb0b33fbdd962ec25d7e3f0e0672","bugs":{"url":"https://github.com/sindresorhus/p-is-promise/issues"},"homepage":"https://github.com/sindresorhus/p-is-promise#readme","_id":"p-is-promise@1.1.0","_shasum":"9c9456989e9f6588017b0434d56097675c3da05e","_from":".","_npmVersion":"3.10.9","_nodeVersion":"7.2.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"9c9456989e9f6588017b0434d56097675c3da05e","size":1723,"noattachment":false,"key":"/p-is-promise/-/p-is-promise-1.1.0.tgz","tarball":"http://name.csiicloud.com:7001/p-is-promise/download/p-is-promise-1.1.0.tgz"},"maintainers":[{"name":"npm:sindresorhus","email":""},{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/p-is-promise-1.1.0.tgz_1480311619830_0.49488614220172167"},"directories":{},"publish_time":1480311620274,"_cnpm_publish_time":1480311620274,"_hasShrinkwrap":false},"1.0.0":{"name":"p-is-promise","version":"1.0.0","description":"Check if something is a promise","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/p-is-promise.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=4"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["promise","is","detect","check","kind","type","thenable","es2015","async","await","promises","bluebird"],"devDependencies":{"ava":"*","bluebird":"^3.4.6","xo":"*"},"xo":{"esnext":true},"gitHead":"fdd034ca24d46a0c12eb6d758ce3159642992aaf","bugs":{"url":"https://github.com/sindresorhus/p-is-promise/issues"},"homepage":"https://github.com/sindresorhus/p-is-promise#readme","_id":"p-is-promise@1.0.0","_shasum":"355cfd5351ff45dad17f4fabfef2df22883af220","_from":".","_npmVersion":"2.15.11","_nodeVersion":"4.6.2","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"355cfd5351ff45dad17f4fabfef2df22883af220","size":1703,"noattachment":false,"key":"/p-is-promise/-/p-is-promise-1.0.0.tgz","tarball":"http://name.csiicloud.com:7001/p-is-promise/download/p-is-promise-1.0.0.tgz"},"maintainers":[{"name":"npm:sindresorhus","email":""},{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/p-is-promise-1.0.0.tgz_1480148834291_0.45526339928619564"},"directories":{},"publish_time":1480148835923,"_cnpm_publish_time":1480148835923,"_hasShrinkwrap":false}},"readme":"# p-is-promise\n\n> Check if something is a promise\n\nWhy not [`is-promise`](https://github.com/then/is-promise)? That module [checks for a thenable](https://github.com/then/is-promise/issues/6), not an ES2015 promise. This one is stricter.\n\nYou most likely don't need this. Just pass your value to `Promise.resolve()` and let it handle it.\n\nCan be useful if you need to create a fast path for a synchronous operation.\n\n## Install\n\n```\n$ npm install p-is-promise\n```\n\n## Usage\n\n```js\nimport isPromise from 'p-is-promise';\nimport Bluebird from 'bluebird';\n\nisPromise(Promise.resolve('????'));\n//=> true\n\nisPromise(Bluebird.resolve('????'));\n//=> true\n\nisPromise('????');\n//=> false\n```\n\n## Related\n\n- [is](https://github.com/sindresorhus/is) - Type check values\n- [More…](https://github.com/sindresorhus/promise-fun)\n\n---\n\n<div align=\"center\">\n\t<b>\n\t\t<a href=\"https://tidelift.com/subscription/pkg/npm-p-is-promise?utm_source=npm-p-is-promise&utm_medium=referral&utm_campaign=readme\">Get professional support for this package with a Tidelift subscription</a>\n\t</b>\n\t<br>\n\t<sub>\n\t\tTidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.\n\t</sub>\n</div>\n","_attachments":{},"homepage":"https://github.com/sindresorhus/p-is-promise#readme","bugs":{"url":"https://github.com/sindresorhus/p-is-promise/issues"},"license":"MIT"}