Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Generated on May 18, 2024 via pnpm

promise 8.3.0

Bare bones Promises/A+ implementation
Package summary
Share
0
issues
1
license
2
MIT
Package created
25 Dec 2012
Version published
25 Oct 2022
Maintainers
2
Total deps
2
Direct deps
1
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
2 Packages, Including:
asap@2.0.6
promise@8.3.0
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

1
All Dependencies CSV
β“˜ This is a list of promise 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
asap2.0.611.14 kBMIT
prod

Visualizations

Frequently Asked Questions

What does promise do?

Promise is a popular npm package that provides a simple implementation of Promises. It is a superset of ES6 Promises designed to offer readable and performant code while only including the essential extensions for using promises effectively in JS applications today. It adheres to the Promises/A+ implementation standard. The aim of this package is to deliver a smooth experience when working with asynchronous programming in JavaScript.

How do you use promise?

To make use of the Promise package in your project, you must first install it to your server using the command npm install promise. From there, you can require it in your JavaScript file.

Here's an example snippet of how to use Promise:

var Promise = require('promise');
var promise = new Promise(function (resolve, reject) {
  get('http://www.google.com', function (err, res) {
    if (err) reject(err);
    else resolve(res);
  });
});

You can also choose to use part of the features or require a pure ES6 polyfill with the following syntax:

var Promise = require('promise/lib/es6-extensions');

To handle unhandled rejections and errors, the package provides methods that can be enabled during development. For example:

require('promise/lib/rejection-tracking').enable();

Please note that direct usage of underscore (_) prefixed properties exposed by this Promise is discouraged as doing so may break your code with each new release.

Where are the promise docs?

You can find the Promise package's documentation at https://www.promisejs.org/api/. The documentation provides detailed information and examples on using the Promise package, including API references, usage examples, information about static and prototype functions, unhandled rejections, and more. It's a valuable resource for understanding and implementing promises effectively in your JavaScript application.