{"name":"vow","version":"0.4.19","description":"DOM Promise and Promises/A+ implementation for Node.js and browsers","homepage":"http://dfilatov.github.io/vow/","keywords":["nodejs","browser","async","promise","dom","a+"],"author":{"name":"Dmitry Filatov","email":"dfilatov@yandex-team.ru"},"contributors":[{"name":"Dmitry Filatov","email":"dfilatov@yandex-team.ru"}],"repository":{"type":"git","url":"git+ssh://git@github.com/dfilatov/vow.git"},"dependencies":{},"devDependencies":{"nodeunit":"","istanbul":"","uglify-js":"1.3.4","promises-aplus-tests":"2.1.0","marked":"0.2.10","jspath":"0.2.11","yate":"0.0.65","highlight.js":"7.5.0","bem-jsd":"1.3.1"},"license":"MIT","main":"lib/vow","engines":{"node":">= 0.4.0"},"scripts":{"test":"./node_modules/istanbul/lib/cli.js test test/utils/runner.js"},"enb":{"sources":["lib/vow.js"]},"gitHead":"5e0fb3596f52ec35f3889c888d3f01a7057a17b3","bugs":{"url":"https://github.com/dfilatov/vow/issues"},"_id":"vow@0.4.19","_npmVersion":"6.4.1","_nodeVersion":"8.15.0","_npmUser":{"name":"dfilatov","email":"dfilatov@inbox.ru"},"dist":{"integrity":"sha512-S+0+CiQlbUhTNWMlJdqo/ARuXOttXdvw5ACGyh1W97NFHUdwt3Fzyaus03Kvdmo733dwnYS9AGJSDg0Zu8mNfA==","shasum":"cc5ef4d6bb6972d830830a7c9ecf8ad834a7c525","tarball":"http://registry-npm.ywwl.com/vow/download/vow-0.4.19.tgz","fileCount":6,"unpackedSize":61205,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcaG/uCRA9TVsSAnZWagAAI48P/RkQ7k37MU25hJTEsY+P\nSfFpwjKyTAf4VFOhDZnPLBp/VRctXbZxCrhif82IM9LyaUyq2J7ygVt5JC6j\nudHC2okbMT/zMvwBNNpRm04Ac+qSthOYDiL4HmBnPx3ZwGLIeaT8xa9BXJYK\nFtvm2qRDfnLQ0/EHJReYNJNXHP31HCHEEc1EnAKxKzJrmhu3xrwO2hx6LfOS\nR9JhLssXB5tnrmLg3oBcY0geRbifQbfvkky5T7ZgDM4H5lPBjDN5Ju93vegf\n1dwuZnisXKllpMYUKrxylvSDI0kInjr6cNWYoLZrbMBii5qZDOZrf9bvZs5X\nXfjEktV07p3vrL3SFHxCA9CTiQn7jvtPL9ze3PNJlEfpWnI7r5/zM0Td7PIq\n4owouuBw8/RYuivE3LY2cGIbBp4aZhZSbs8jHn0mtFErEc8BY343IvDzHRzs\nlGLesTTvNHJl5LH5sV9Qf09tWCltGSXZU15bibRuzoeTPBT2VlG4AvI1g9Ou\nHu1zQZ6sai+jNaOAduxsCzR6Igm0DeoRxEmbzAuE4gkACmO9O1BnauQW8OCO\nXNZ3FVEJy19X1s2q9m57ipEg+8C5d6maHz7ljY3NE69irJpNom2kEsmVN5Ni\n4JTfYZ6FcjX06dN/6FmHVAxd77qYH2tPUX/z15kjbhEOZk9jKKSwFfJh6463\nAk9U\r\n=hLzq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICLdpi/7MbVAwEF65CEq9amA6rhJcJhLY30/NyQsWcUHAiEA+8FOEZ1knVSwan3NvKmdfr3nUoHe6ZgPtR9MGNE5fgI="}],"size":13425,"noattachment":false,"key":"/vow/-/vow-0.4.19.tgz"},"maintainers":[{"name":"dfilatov","email":"dfilatov@yandex-team.ru"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vow_0.4.19_1550348270041_0.17072605475039704"},"_hasShrinkwrap":false,"readme":"<a href=\"http://promises-aplus.github.com/promises-spec\"><img src=\"http://promises-aplus.github.com/promises-spec/assets/logo-small.png\" align=\"right\" /></a>\r\nVow\r\n[![NPM Version](https://img.shields.io/npm/v/vow.svg?style=flat-square)](https://www.npmjs.com/package/vow)\r\n[![Build Status](https://img.shields.io/travis/dfilatov/vow/master.svg?style=flat-square)](https://travis-ci.org/dfilatov/vow/branches)\r\n[![NPM Downloads](https://img.shields.io/npm/dm/vow.svg?style=flat-square)](https://www.npmjs.org/package/vow)\r\n=========\r\n\r\nVow is a [Promises/A+](http://promisesaplus.com/) implementation.\r\nIt also supports [ES6 Promises](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-promise-objects) specification.\r\n\r\nFull API reference can be found at http://dfilatov.github.io/vow/.\r\n\r\nGetting Started\r\n---------------\r\n### In Node.js ###\r\nYou can install using Node Package Manager (npm):\r\n\r\n    npm install vow\r\n\r\n### In Browsers ###\r\n```html\r\n<script type=\"text/javascript\" src=\"vow.min.js\"></script>\r\n```\r\nIt also supports RequireJS module format and [YM module](https://github.com/ymaps/modules) format.\r\n\r\nVow has been tested in IE6+, Mozilla Firefox 3+, Chrome 5+, Safari 5+, Opera 10+.\r\n\r\nUsage\r\n-----\r\n### Creating a promise ###\r\nThere are two possible ways to create a promise.\r\n#### 1. Using a deferred ####\r\n```js\r\nfunction doSomethingAsync() {\r\n    var deferred = vow.defer();\r\n    \r\n    // now you can resolve, reject, notify corresponging promise within `deferred`\r\n    // e.g. `defer.resolve('ok');`\r\n        \r\n    return deferred.promise(); // and return corresponding promise to subscribe to reactions\r\n}\r\n\r\ndoSomethingAsync().then(\r\n    function() {}, // onFulfilled reaction\r\n    function() {}, // onRejected reaction\r\n    function() {}  // onNotified reaction\r\n    );\r\n```\r\nThe difference between `deferred` and `promise` is that `deferred` contains methods to resolve, reject and notify corresponding promise, but the `promise` by itself allows only to subscribe on these actions.\r\n\r\n#### 2. ES6-compatible way ####\r\n```js\r\nfunction doSomethingAsync() {\r\n    return new vow.Promise(function(resolve, reject, notify) {\r\n        // now you can resolve, reject, notify the promise\r\n    });\r\n}\r\n\r\ndoSomethingAsync().then(\r\n    function() {}, // onFulfilled reaction\r\n    function() {}, // onRejected reaction\r\n    function() {}  // onNotified reaction\r\n    );\r\n```\r\n\r\nExtensions and related projects\r\n-------------------------------\r\n  * [vow-fs](https://github.com/dfilatov/vow-fs) — vow-based file I/O for Node.js\r\n  * [vow-node](https://github.com/dfilatov/vow-node) — extension for vow to work with nodejs-style callbacks\r\n  * [vow-queue](https://github.com/dfilatov/vow-queue) — vow-based task queue with weights and priorities\r\n  * [vow-asker](https://github.com/nodules/vow-asker) — wraps [asker](https://github.com/nodules/asker) API in the vow promises implementation\r\n\r\n**NOTE**. Documentation for old versions of the library can be found at https://github.com/dfilatov/vow/blob/0.3.x/README.md.\r\n","publish_time":1550348270145,"_cnpm_publish_time":1550348270145,"dist-tags":{"latest":"0.4.20"}}