pinkie-promise
's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.Name | Version | Size | License | Type | Vulnerabilities |
---|---|---|---|---|---|
pinkie | 2.0.4 | 3.84 kB | MIT | prod |
Pinkie-Promise is an NPM package that serves as an ES2015 Promise ponyfill. It exports the global Promise object, if available, or the pinkie
Promise polyfill, ensuring that you can use ES2015 Promise in your JavaScript code even in environments that do not natively support it.
Using Pinkie-Promise in your JavaScript application is straightforward. First, install the package in your project by running the command npm install --save pinkie-promise
in your terminal. Once installed, you can use pinkie-promise
with the following code snippet:
var Promise = require('pinkie-promise');
new Promise(function (resolve) {
resolve('unicorns');
});
//=> Promise { 'unicorns' }
The code above requires the pinkie-promise
package and uses it to create a new Promise that resolves to 'unicorns'.
In-depth documentation for Pinkie-Promise can be found on its GitHub page: https://github.com/floatdrop/pinkie-promise. The page provides you with all the information you would need to use the package, from installation to usage examples. Please visit the GitHub link for more detailed instructions and insights.