This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
admin-panel/graphql-types/node_modules/is-promise
2021-03-09 19:44:13 +01:00
..
index.d.ts add configured graphql-codegen 2021-03-09 19:44:13 +01:00
index.js add configured graphql-codegen 2021-03-09 19:44:13 +01:00
index.mjs add configured graphql-codegen 2021-03-09 19:44:13 +01:00
LICENSE add configured graphql-codegen 2021-03-09 19:44:13 +01:00
package.json add configured graphql-codegen 2021-03-09 19:44:13 +01:00
readme.md add configured graphql-codegen 2021-03-09 19:44:13 +01:00

is-promise

Test whether an object looks like a promises-a+ promise

Build Status Dependency Status NPM version

Installation

$ npm install is-promise

You can also use it client side via npm.

API

import isPromise from 'is-promise';

isPromise(Promise.resolve());//=>true
isPromise({then:function () {...}});//=>true
isPromise(null);//=>false
isPromise({});//=>false
isPromise({then: true})//=>false

License

MIT