{"name":"parole","version":"1.1.11","description":"Another ES6 promise implementation (compliant with Promises/A+)","main":"parole.js","scripts":{"test":"make test"},"repository":{"type":"git","url":"git+ssh://git@github.com/kiltjs/parole.git"},"keywords":["promise","polyfill","add-ons","when","es6"],"author":{"name":"Jesús Germade","email":"jesus@germade.es"},"license":"MIT","bugs":{"url":"https://github.com/kiltjs/parole/issues"},"homepage":"https://github.com/kiltjs/parole#readme","devDependencies":{"benchmark":"^2.1.4","chai":"^4.1.2","eslint":"^4.18.0","karma":"^1.7.1","karma-chai":"^0.1.0","karma-chrome-launcher":"^2.2.0","karma-firefox-launcher":"^1.1.0","karma-mocha":"^1.1.1","karma-story-reporter":"^0.3.1","mocha":"^5.0.1","promises-aplus-tests":"^2.1.2","uglify-js":"^3.3.11","p-promise":"^0.5.0"},"dependencies":{},"gitHead":"981c5fcac1a748f61421f091441c14c0a84bbf99","_id":"parole@1.1.11","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"jgermade","email":"jesus@germade.es"},"dist":{"integrity":"sha512-iqajqnkHC8EiijNUuc/LOayrLCs8akx26TexliGzYh7CWU0fSqwm6rtT5W04D0PO1PpWShP8BWYcn0q54rhytg==","shasum":"2ecba198d3def0a3c80289ebd5cb03a3bfcb16f9","tarball":"http://registry-npm.ywwl.com/parole/download/parole-1.1.11.tgz","fileCount":18,"unpackedSize":31480,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH0DFVlKFlEUqpFE4cbrX/ITU7nhdcuK9nCpLF3FrWstAiEA1NtkgFU4Z0NSOChCaUKKos9Cz6suQnnCJDFX+mFAUcs="}],"size":8444,"noattachment":false,"key":"/parole/-/parole-1.1.11.tgz"},"maintainers":[{"name":"jgermade","email":"jesus@germade.es"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/parole_1.1.11_1518963148120_0.7237698904161931"},"_hasShrinkwrap":false,"readme":"\n# Parole\n\n[<img src=\"https://raw.githubusercontent.com/promises-aplus/promises-spec/master/logo.svg\" alt=\"Promises/A+ logo\" width=\"82px\" height=\"82px\" title=\"Promises/A+ 1.0 compliant\" align=\"right\" />](https://promisesaplus.com/)\n\n<!-- [<img src=\"https://promisesaplus.com/assets/logo-small.png\" alt=\"Promises/A+ logo\" title=\"Promises/A+ 1.0 compliant\" align=\"right\" />](https://promisesaplus.com/) -->\n\nAnother ES6 promise implementation ([compliant](https://github.com/promises-aplus/promises-tests) with [Promises/A+](https://github.com/promises-aplus/promises-spec))\n\n[![ᴋɪʟᴛ ᴊs](https://jesus.germade.dev/assets/images/badge-kiltjs.svg)](https://github.com/kiltjs)\n[![npm](https://img.shields.io/npm/v/parole.svg)](https://www.npmjs.com/package/parole)\n[![Build Status](https://cloud.drone.io/api/badges/kiltjs/parole/status.svg)](https://cloud.drone.io/kiltjs/parole)\n[![codecov](https://codecov.io/gh/jgermade/parole/branch/master/graph/badge.svg?token=TA3W7MIMB9)](https://codecov.io/gh/jgermade/parole)\n[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)\n\n## Installation\n```.sh\nnpm install parole\n\n# alternatively you can use bower (minified version by default)\nyarn add parole\n```\n\n### ES6 fulfill\n\n> `Parole` implements [ES6 Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) specs\n\nImplements:\n- Promise.prototype.then\n- Promise.prototype.catch\n- Promise.prototype.finally\n\nAlso static methods\n- Promise.resolve\n- Promise.reject\n- Promise.all\n- Promise.allSettled\n- Promise.any\n- Promise.race\n\nIncludes:\n- Promise.defer\n\n``` js\n// parole respects the es6 promise specification\n// you can use parole as global polyfill\n\nif( !window.Promise ) {\n  window.Promise = Parole;\n}\n```\n\n### Example\n``` js\nnew Parole((resolve, reject) => {\n    resolve('gogogo!')\n  })\n\n  .then((result) => {\n    console.log('checkpoint 1', result)\n    throw 'whoops!'\n  })\n\n  .then(\n    (result) => {\n      console.log('checkpoint 2', result)\n    },\n    (result) => {\n      console.log('checkpoint 2.1', result)\n      return new Parole((resolve, reject) => {\n        setTimeout(() => resolve('all right!'), 400)\n      })\n    },\n  )\n\n  .then(\n    (result) => console.log('checkpoint 3', result),\n    (reason) => console.log('checkpoint 3.1', reason),\n  )\n;\n```\n> output\n\n```.sh\ncheckpoint 1 gogogo!\ncheckpoint 2.1 whoops!\n# elapsed 400ms\ncheckpoint 3 all right!\n```\n\n","publish_time":1518963148195,"_cnpm_publish_time":1518963148195,"dist-tags":{"latest":"2.0.28"}}