"Fossies" - the Fresh Open Source Software Archive

Member "Atom/resources/app/apm/node_modules/pinkie/readme.md" (7 Feb 2017, 2691 Bytes) of archive /windows/misc/atom-windows.zip:

As a special service "Fossies" has tried to format the requested source page into HTML format (assuming markdown format). Alternatively you can here view or download the uninterpreted source code file. A member file download can also be achieved by clicking within a package contents listing on the according byte size field.

<img width="256" src="media/logo.png" alt="pinkie">

Itty bitty little widdle twinkie pinkie ES2015 Promise implementation

Build Status Coverage Status

There are tons of Promise implementations out there, but all of them focus on browser compatibility and are often bloated with functionality.

This module is an exact Promise specification polyfill (like native-promise-only), but in Node.js land (it should be browserify-able though).


$ npm install --save pinkie


var fs = require('fs');
var Promise = require('pinkie');

new Promise(function (resolve, reject) {
    fs.readFile('foo.json', 'utf8', function (err, data) {
        if (err) {

//=> Promise


pinkie exports bare ES2015 Promise implementation and polyfills Node.js rejection events. In case you forgot:

new Promise(executor)

Returns new instance of Promise.


Type: function

Function with two arguments resolve and reject. The first argument fulfills the promise, the second argument rejects it.


Returns a promise that resolves when all of the promises in the promises Array argument have resolved.


Returns a promise that resolves or rejects as soon as one of the promises in the promises Array resolves or rejects, with the value or reason from that promise.


Returns a Promise object that is rejected with the given reason.


Returns a Promise object that is resolved with the given value. If the value is a thenable (i.e. has a then method), the returned promise will "follow" that thenable, adopting its eventual state; otherwise the returned promise will be fulfilled with the value.


MIT © Vsevolod Strukchinsky