Socket
Socket
Sign inDemoInstall

is-promise

Package Overview
Dependencies
0
Maintainers
2
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Protect your apps from supply chain attacks

Install

is-promise

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

    4.0.0latest
    GitHub
    npm

Version published
Maintainers
2
Weekly downloads
10,000,267
increased by2.7%

Weekly downloads

Readme

Source

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

FAQs

Last updated on 27 Apr 2020

Did you know?

Socket installs a GitHub app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc