{"name":"vow","version":"0.4.20","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":"0.11.3","istanbul":"0.4.5","terser":"4.0.2","promises-aplus-tests":"2.1.0","marked":"0.6.3","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":"a05571a479fc4fa69d99656b84ed5c34fe51417d","bugs":{"url":"https://github.com/dfilatov/vow/issues"},"_id":"vow@0.4.20","_npmVersion":"6.4.1","_nodeVersion":"8.16.0","_npmUser":{"name":"dfilatov","email":"dfilatov@inbox.ru"},"dist":{"integrity":"sha512-YYoSYXUYABqY08D/WrjcWJxJSErcILRRTQpcPyUc0SFfgIPKSUFzVt7u1HC3TXGJZM/qhsSjCLNQstxqf7asgQ==","shasum":"77ca6ef0828e0043a93e55dc37030226519ce711","tarball":"http://registry-npm.ywwl.com/vow/download/vow-0.4.20.tgz","fileCount":6,"unpackedSize":62439,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdHJNQCRA9TVsSAnZWagAAwXoP/1O3ng0wskfDhryKucQB\nZk+UDWwtOwPKyTYkZZBH/doyRYGZukmkCXR3fqv9hczrl/nQYRD9ZWHjawCO\niE+RH0ASZM+yJXTkLmfkz6SZO3IX2K6IYMXEyBCojus5XU/XCLy1EFIENXKI\nA0hLKMC8KggtXioPDibuf3oFZBd4PSDkYbgveatUm9E/+TPOza7gH0+IWz+C\nXcPpypBzkjvNnr2PmA80aOJHKeIbQlapryEUmLvoWb5mvtdW6A/Iunm2dquq\n35TC7+hp/xx7y+j98g8DQ+m0i3DoB2cid4+4EQup75Uw2dxC5Yi7InAN4nSY\n2Ngz+KT70RNdIjCAUsLARIXBQsaAIfockMgw4X0UmWZSI2GOWvTIyPHzwu+0\nfbu6yHTfLH2kP/H/C+BvvqPWR7iJKq0w1zJvPuYqPgUhOwvEfrlp0lkfZMVs\nqiEnUfrUb+sxWklJxeYfGDWze+G7K6YZE/WAamKNMIvEqCWZRXeIr8oGoi7T\nnE8ujiMriUTDowKPXn+1JL2WvfwJSjTQHQnnCE40/wHfOQKK8prrCWjZSfpr\nkfiUMh/UN0tbIWhQCwQHg3P+1+0HhgiVmQsL1Yac2rARvfaMCcIbmkk51Skq\n9Z17Z4lO0nhJxGHGMnWrueBqaj7v+OEq7gg7qOkBJcb5oRV4u7bHATtyCkIK\nSBso\r\n=Z+4b\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDj5jM97t5lf6dAwjDdpkEQnI57FfSLqiX/Riv4tbKNIgIgauKqVJzQo6YJ2x0jImKse3RH8z4UGfG9HtsdZAvmpX4="}],"size":13542,"noattachment":false,"key":"/vow/-/vow-0.4.20.tgz"},"maintainers":[{"name":"dfilatov","email":"dfilatov@yandex-team.ru"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vow_0.4.20_1562153807628_0.3405606382086348"},"_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":1562153807771,"_cnpm_publish_time":1562153807771,"dist-tags":{"latest":"0.4.20"}}