pax_global_header00006660000000000000000000000064127025075100014511gustar00rootroot0000000000000052 comment=4a936c09c34ad591a25db93f1216d242de0d6184 pinkie-promise-2.0.1/000077500000000000000000000000001270250751000144445ustar00rootroot00000000000000pinkie-promise-2.0.1/.editorconfig000066400000000000000000000003471270250751000171250ustar00rootroot00000000000000root = true [*] indent_style = tab end_of_line = lf charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true [{package.json,*.yml}] indent_style = space indent_size = 2 [*.md] trim_trailing_whitespace = false pinkie-promise-2.0.1/.gitattributes000066400000000000000000000000141270250751000173320ustar00rootroot00000000000000* text=auto pinkie-promise-2.0.1/.gitignore000066400000000000000000000000151270250751000164300ustar00rootroot00000000000000node_modules pinkie-promise-2.0.1/.jshintrc000066400000000000000000000002521270250751000162700ustar00rootroot00000000000000{ "node": true, "esnext": true, "bitwise": true, "curly": true, "immed": true, "newcap": true, "noarg": true, "undef": true, "unused": "vars", "strict": true } pinkie-promise-2.0.1/.travis.yml000066400000000000000000000001101270250751000165450ustar00rootroot00000000000000sudo: false language: node_js node_js: - 'iojs' - '0.12' - '0.10' pinkie-promise-2.0.1/index.js000066400000000000000000000001351270250751000161100ustar00rootroot00000000000000'use strict'; module.exports = typeof Promise === 'function' ? Promise : require('pinkie'); pinkie-promise-2.0.1/license000066400000000000000000000021501270250751000160070ustar00rootroot00000000000000The MIT License (MIT) Copyright (c) Vsevolod Strukchinsky (github.com/floatdrop) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. pinkie-promise-2.0.1/package.json000066400000000000000000000011341270250751000167310ustar00rootroot00000000000000{ "name": "pinkie-promise", "version": "2.0.1", "description": "ES2015 Promise ponyfill", "license": "MIT", "repository": "floatdrop/pinkie-promise", "author": { "name": "Vsevolod Strukchinsky", "email": "floatdrop@gmail.com", "url": "github.com/floatdrop" }, "engines": { "node": ">=0.10.0" }, "scripts": { "test": "mocha" }, "files": [ "index.js" ], "keywords": [ "promise", "promises", "es2015", "es6", "polyfill", "ponyfill" ], "dependencies": { "pinkie": "^2.0.0" }, "devDependencies": { "mocha": "*" } } pinkie-promise-2.0.1/readme.md000066400000000000000000000013571270250751000162310ustar00rootroot00000000000000# pinkie-promise [![Build Status](https://travis-ci.org/floatdrop/pinkie-promise.svg?branch=master)](https://travis-ci.org/floatdrop/pinkie-promise) > [ES2015 Promise](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-promise-objects) ponyfill Module exports global Promise object (if available) or [`pinkie`](http://github.com/floatdrop/pinkie) Promise polyfill. ## Install ``` $ npm install --save pinkie-promise ``` ## Usage ```js var Promise = require('pinkie-promise'); new Promise(function (resolve) { resolve('unicorns'); }); //=> Promise { 'unicorns' } ``` ## Related - [pify](https://github.com/sindresorhus/pify) - Promisify a callback-style function ## License MIT © [Vsevolod Strukchinsky](http://github.com/floatdrop) pinkie-promise-2.0.1/test.js000066400000000000000000000004341270250751000157620ustar00rootroot00000000000000'use strict'; var assert = require('assert'); var pinkiePromise = require('./'); var pinkie = require('pinkie'); it('should ponyfill Promise', function () { if (global.Promise) { assert.equal(pinkiePromise, global.Promise); } else { assert.equal(pinkiePromise, pinkie); } });