Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on Apr 24, 2024 via pnpm

es6-promise 4.2.8

A lightweight library that provides tools for organizing asynchronous code
Package summary
Share
0
issues
1
license
1
MIT
Package created
16 Dec 2013
Version published
6 Jun 2019
Maintainers
2
Total deps
1
Direct deps
0
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
es6-promise@4.2.8
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of es6-promise 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does es6-promise do?

The ES6-Promise is a lightweight programming library that serves as a polyfill of the ES6 Promise. It's designed to help JavaScript developers organize asynchronous code in an intuitive and efficient manner. It's particularly beneficial in environments where the Promise feature is missing or not properly functioning.

How do you use es6-promise?

To use ES6-Promise, you'd first need to install it. For Node.js, this can be done either through Yarn or NPM as follows:

yarn add es6-promise

or

npm install es6-promise

Once installed, you can incorporate it in your code as follows:

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

Remember to use string access for catch and finally methods in IE<9 as they are reserved keywords in such environments. For instance:

promise['catch'](function(err) {
  // Handle error
});

promise['finally'](function() {
  // Execute code after promise is settled
});

If you want to polyfill the global environment, you can use the following code snippet:

require('es6-promise').polyfill();

or alternatively:

require('es6-promise/auto');

Where are the es6-promise docs?

In-depth details of the ES6-Promise API and how to use promises can be found in the 'JavaScript Promises HTML5Rocks article'. For additional features and debugging options, developers might want to explore the full RSVP.js library which ES6-Promise is a subset of.