Socket
Socket
Sign inDemoInstall

native-promise

Package Overview
Dependencies
0
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    native-promise

Get native `Promise` or falsey value if not available.


Version published
Maintainers
1
Install size
7.11 kB
Created

Changelog

Source

1.0.1 - 2016-08-25

  • Release v1.0.1 / npm@v1.0.1
  • resolves #2 by PR #3

Readme

Source

native-promise npmjs.com The MIT License

Get native Promise or falsey value if not available.

code climate standard code style travis build status coverage status dependency status

Install

npm i native-promise --save

Usage

For more use-cases see the tests

var NativePromise = require('native-promise')

if (NativePromise) {
  var promise = NativePromise.resolve(123)
  promise.then(function (res) {
    console.log(res) //=> 123
  })
} else {
  console.log(NativePromise) //=> false
}
  • always-done: Handles completion and errors of anything!
  • always-promise: Promisify basically everything.
  • native-or-another: Always will expose native Promise if available, otherwise Bluebird but only if you don't give another promise module like q or promise or what you want.
  • redolent: Simple promisify a callback-style function with sane defaults.

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
But before doing anything, please read the CONTRIBUTING.md guidelines.

Charlike Make Reagent new message to charlike freenode #charlike

tunnckocore.tk keybase tunnckocore tunnckoCore npm tunnckoCore twitter tunnckoCore github

Keywords

FAQs

Last updated on 24 Aug 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your 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