{ "_args": [ [ { "raw": "pinkie@^2.0.0", "scope": null, "escapedName": "pinkie", "name": "pinkie", "rawSpec": "^2.0.0", "spec": ">=2.0.0 <3.0.0", "type": "range" }, "/home/jdaugherty/work/GT2/GT2-Android/node_modules/pinkie-promise" ] ], "_from": "pinkie@>=2.0.0 <3.0.0", "_id": "pinkie@2.0.4", "_inCache": true, "_location": "/pinkie", "_nodeVersion": "4.2.4", "_npmUser": { "name": "floatdrop", "email": "floatdrop@gmail.com" }, "_npmVersion": "2.14.12", "_phantomChildren": {}, "_requested": { "raw": "pinkie@^2.0.0", "scope": null, "escapedName": "pinkie", "name": "pinkie", "rawSpec": "^2.0.0", "spec": ">=2.0.0 <3.0.0", "type": "range" }, "_requiredBy": [ "/pinkie-promise" ], "_resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", "_shasum": "72556b80cfa0d48a974e80e77248e80ed4f7f870", "_shrinkwrap": null, "_spec": "pinkie@^2.0.0", "_where": "/home/jdaugherty/work/GT2/GT2-Android/node_modules/pinkie-promise", "author": { "name": "Vsevolod Strukchinsky", "email": "floatdrop@gmail.com", "url": "github.com/floatdrop" }, "bugs": { "url": "https://github.com/floatdrop/pinkie/issues" }, "dependencies": {}, "description": "Itty bitty little widdle twinkie pinkie ES2015 Promise implementation", "devDependencies": { "core-assert": "^0.1.1", "coveralls": "^2.11.4", "mocha": "*", "nyc": "^3.2.2", "promises-aplus-tests": "*", "xo": "^0.10.1" }, "directories": {}, "dist": { "shasum": "72556b80cfa0d48a974e80e77248e80ed4f7f870", "tarball": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz" }, "engines": { "node": ">=0.10.0" }, "files": [ "index.js" ], "homepage": "https://github.com/floatdrop/pinkie#readme", "keywords": [ "promise", "promises", "es2015", "es6" ], "license": "MIT", "maintainers": [ { "name": "puradox", "email": "sambalana247@gmail.com" } ], "name": "pinkie", "optionalDependencies": {}, "readme": "

\n\t
\n\t\"pinkie\"\n\t
\n\t
\n

\n\n> Itty bitty little widdle twinkie pinkie [ES2015 Promise](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-promise-objects) implementation\n\n[![Build Status](https://travis-ci.org/floatdrop/pinkie.svg?branch=master)](https://travis-ci.org/floatdrop/pinkie) [![Coverage Status](https://coveralls.io/repos/floatdrop/pinkie/badge.svg?branch=master&service=github)](https://coveralls.io/github/floatdrop/pinkie?branch=master)\n\nThere are [tons of Promise implementations](https://github.com/promises-aplus/promises-spec/blob/master/implementations.md#standalone) out there, but all of them focus on browser compatibility and are often bloated with functionality.\n\nThis module is an exact Promise specification polyfill (like [native-promise-only](https://github.com/getify/native-promise-only)), but in Node.js land (it should be browserify-able though).\n\n\n## Install\n\n```\n$ npm install --save pinkie\n```\n\n\n## Usage\n\n```js\nvar fs = require('fs');\nvar Promise = require('pinkie');\n\nnew Promise(function (resolve, reject) {\n\tfs.readFile('foo.json', 'utf8', function (err, data) {\n\t\tif (err) {\n\t\t\treject(err);\n\t\t\treturn;\n\t\t}\n\n\t\tresolve(data);\n\t});\n});\n//=> Promise\n```\n\n\n### API\n\n`pinkie` exports bare [ES2015 Promise](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-promise-objects) implementation and polyfills [Node.js rejection events](https://nodejs.org/api/process.html#process_event_unhandledrejection). In case you forgot:\n\n#### new Promise(executor)\n\nReturns new instance of `Promise`.\n\n##### executor\n\n*Required* \nType: `function`\n\nFunction with two arguments `resolve` and `reject`. The first argument fulfills the promise, the second argument rejects it.\n\n#### pinkie.all(promises)\n\nReturns a promise that resolves when all of the promises in the `promises` Array argument have resolved.\n\n#### pinkie.race(promises)\n\nReturns 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.\n\n#### pinkie.reject(reason)\n\nReturns a Promise object that is rejected with the given `reason`.\n\n#### pinkie.resolve(value)\n\nReturns 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`.\n\n\n## Related\n\n- [pinkie-promise](https://github.com/floatdrop/pinkie-promise) - Returns the native Promise or this module\n\n\n## License\n\nMIT © [Vsevolod Strukchinsky](http://github.com/floatdrop)\n", "readmeFilename": "readme.md", "repository": { "type": "git", "url": "git+https://github.com/floatdrop/pinkie.git" }, "scripts": { "coverage": "nyc report --reporter=text-lcov | coveralls", "test": "xo && nyc mocha" }, "version": "2.0.4" }