libreccm-legacy/tools-ng/tinymce/plugins/ccm-cms-images/node_modules/pinkie
baka 50ec8b6c4e [3056] Image plugin now in new directory. Also temporarly removes the toolbar button because its not working anyways. Running npm run build inside the plugin root will now compile the plugin into ccm-core.
git-svn-id: https://svn.libreccm.org/ccm/trunk@5740 8810af33-2d31-482b-a856-94f89814c4df
2018-11-21 10:20:00 +00:00
..
index.js [3056] Image plugin now in new directory. Also temporarly removes the toolbar button because its not working anyways. Running npm run build inside the plugin root will now compile the plugin into ccm-core. 2018-11-21 10:20:00 +00:00
license [3056] Image plugin now in new directory. Also temporarly removes the toolbar button because its not working anyways. Running npm run build inside the plugin root will now compile the plugin into ccm-core. 2018-11-21 10:20:00 +00:00
package.json [3056] Image plugin now in new directory. Also temporarly removes the toolbar button because its not working anyways. Running npm run build inside the plugin root will now compile the plugin into ccm-core. 2018-11-21 10:20:00 +00:00
readme.md [3056] Image plugin now in new directory. Also temporarly removes the toolbar button because its not working anyways. Running npm run build inside the plugin root will now compile the plugin into ccm-core. 2018-11-21 10:20:00 +00:00

readme.md


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).

Install

$ npm install --save pinkie

Usage

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

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

		resolve(data);
	});
});
//=> Promise

API

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

new Promise(executor)

Returns new instance of Promise.

executor

Required
Type: function

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

pinkie.all(promises)

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

pinkie.race(promises)

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.

pinkie.reject(reason)

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

pinkie.resolve(value)

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.

License

MIT © Vsevolod Strukchinsky