Socket
Socket
Sign inDemoInstall

es6-promise-promise

Package Overview
Dependencies
1
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    es6-promise-promise

module that exports the Promise property from es6-promise


Version published
Weekly downloads
15K
decreased by-4.01%
Maintainers
1
Install size
173 kB
Created
Weekly downloads
 

Readme

Source

es6-promise-promise

Simple package that exports the Promise property from es6-promise.

# Install npm i es6-promise-promise

Usage

Instead of var Promise = require('es6-promise').Promise;

just

var Promise = require('es6-promise-promise');

Why I created this

If you want to ship less code sometimes you just want to replace some Promise implementations by another.

For example if you don't want universal-promise in yup and you want to alias it (webpack configuration), you can't do it easily with

alias: {
    'universal-promise': 'es6-promise',
}

because one is a promise, the other an object.

Fix this by using

alias: {
    'universal-promise': 'es6-promise-promise',
}

and you're good to go.

Same thing with the ProvidePlugin for example ... This won't work

new webpack.ProvidePlugin({
    Promise: 'es6-promise', // Promise is not a function
})

This will

new webpack.ProvidePlugin({
    Promise: 'es6-promise-promise', // works as expected
})

Keywords

FAQs

Last updated on 18 May 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