{"_id":"defer-promise","_rev":"334978","name":"defer-promise","description":"Isomorphic function returning a deferred promise. Uses native `Promise.defer` if available, else polyfills.","dist-tags":{"latest":"2.0.1"},"maintainers":[{"name":"75lb","email":"75pound@gmail.com"}],"time":{"modified":"2021-06-08T13:15:50.000Z","created":"2015-10-25T17:14:16.507Z","2.0.1":"2018-12-14T00:34:12.406Z","2.0.0":"2018-12-14T00:32:58.725Z","1.0.2":"2018-11-16T00:08:02.548Z","1.0.1":"2017-02-02T21:18:55.304Z","1.0.0":"2016-06-05T08:15:49.998Z","0.1.2":"2015-12-20T16:18:52.074Z","0.1.1":"2015-10-25T17:19:55.577Z","0.1.0":"2015-10-25T17:14:16.507Z"},"users":{"yikuo":true},"author":{"name":"Lloyd Brookes","email":"75pound@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/75lb/defer-promise.git"},"versions":{"2.0.1":{"name":"defer-promise","author":{"name":"Lloyd Brookes","email":"75pound@gmail.com"},"version":"2.0.1","description":"Isomorphic function returning a deferred promise. Uses native `Promise.defer` if available, else polyfills.","repository":{"type":"git","url":"git+https://github.com/75lb/defer-promise.git"},"license":"MIT","keywords":["defer","promise","es6","native","deferred"],"main":"dist/index.js","engines":{"node":">=6.0.0"},"scripts":{"test":"test-runner test.js","dist":"rollup -c dist/index.config.js"},"devDependencies":{"rollup":"^0.67.4","test-runner":"^0.5.1"},"gitHead":"864702e224372dea9537a1786055d130a8111e90","bugs":{"url":"https://github.com/75lb/defer-promise/issues"},"homepage":"https://github.com/75lb/defer-promise#readme","_id":"defer-promise@2.0.1","_npmVersion":"6.5.0","_nodeVersion":"11.4.0","_npmUser":{"name":"75lb","email":"75pound@gmail.com"},"dist":{"shasum":"7e6c67a55a17a9a7079fbd524cf2c1dadae3590b","size":2124,"noattachment":false,"key":"/defer-promise/-/defer-promise-2.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/defer-promise/download/defer-promise-2.0.1.tgz"},"maintainers":[{"name":"75lb","email":"75pound@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/defer-promise_2.0.1_1544747652254_0.7719159500808959"},"_hasShrinkwrap":false,"publish_time":1544747652406,"_cnpm_publish_time":1544747652406},"2.0.0":{"name":"defer-promise","author":{"name":"Lloyd Brookes","email":"75pound@gmail.com"},"version":"2.0.0","description":"Isomorphic function returning a deferred promise. Uses native `Promise.defer` if available, else polyfills.","repository":{"type":"git","url":"git+https://github.com/75lb/defer-promise.git"},"license":"MIT","keywords":["defer","promise","es6","native","deferred"],"main":"dist/index.js","engines":{"node":">=6.0.0"},"scripts":{"test":"test-runner test.js","dist":"rollup -c dist/index.config.js"},"devDependencies":{"rollup":"^0.67.4","test-runner":"^0.5.1"},"gitHead":"28090e1c248f334dda759bbec788078ada19bcc6","bugs":{"url":"https://github.com/75lb/defer-promise/issues"},"homepage":"https://github.com/75lb/defer-promise#readme","_id":"defer-promise@2.0.0","_npmVersion":"6.5.0","_nodeVersion":"11.4.0","_npmUser":{"name":"75lb","email":"75pound@gmail.com"},"dist":{"shasum":"72f79dd85c0aa5bafbe224d5f51b33d95b08defb","size":2024,"noattachment":false,"key":"/defer-promise/-/defer-promise-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/defer-promise/download/defer-promise-2.0.0.tgz"},"maintainers":[{"name":"75lb","email":"75pound@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/defer-promise_2.0.0_1544747578523_0.3630475068927683"},"_hasShrinkwrap":false,"publish_time":1544747578725,"_cnpm_publish_time":1544747578725},"1.0.2":{"name":"defer-promise","author":{"name":"Lloyd Brookes","email":"75pound@gmail.com"},"version":"1.0.2","description":"Returns a deferred promise. Uses native `Promise.defer` if available, else polyfill.","repository":{"type":"git","url":"git+https://github.com/75lb/defer-promise.git"},"license":"MIT","keywords":["defer","promise","es6","native","deferred"],"engines":{"node":">=4.0.0"},"scripts":{"test":"test-runner test.js"},"devDependencies":{"test-runner":"^0.5.1"},"gitHead":"8f5a2abfe8784759ed4a8c1c8516a2de8383e2a0","bugs":{"url":"https://github.com/75lb/defer-promise/issues"},"homepage":"https://github.com/75lb/defer-promise#readme","_id":"defer-promise@1.0.2","_npmVersion":"6.4.1","_nodeVersion":"11.1.0","_npmUser":{"name":"75lb","email":"75pound@gmail.com"},"dist":{"shasum":"b79521c59cadadaed2d305385d30f8b05cbf9196","size":1695,"noattachment":false,"key":"/defer-promise/-/defer-promise-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/defer-promise/download/defer-promise-1.0.2.tgz"},"maintainers":[{"name":"75lb","email":"75pound@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/defer-promise_1.0.2_1542326882416_0.5798737494676636"},"_hasShrinkwrap":false,"publish_time":1542326882548,"_cnpm_publish_time":1542326882548},"1.0.1":{"name":"defer-promise","author":{"name":"Lloyd Brookes","email":"75pound@gmail.com"},"version":"1.0.1","description":"defer-promise","repository":{"type":"git","url":"git+https://github.com/75lb/defer-promise.git"},"license":"MIT","main":"./lib/defer-promise.js","keywords":["defer","promise","es6","native","deferred"],"engines":{"node":">=0.10.0"},"scripts":{"test":"test-runner test/*.js","docs":"jsdoc2md -t jsdoc2md/README.hbs lib/*.js > README.md; echo"},"devDependencies":{"test-runner":"^0.3.0"},"gitHead":"64aa2664317790e567dfdb91ae04bf52db440083","bugs":{"url":"https://github.com/75lb/defer-promise/issues"},"homepage":"https://github.com/75lb/defer-promise#readme","_id":"defer-promise@1.0.1","_shasum":"1ca6ffeddbcef1715dd7aae25c7616f9ae22932f","_from":".","_npmVersion":"4.1.2","_nodeVersion":"7.5.0","_npmUser":{"name":"75lb","email":"75pound@gmail.com"},"dist":{"shasum":"1ca6ffeddbcef1715dd7aae25c7616f9ae22932f","size":2020,"noattachment":false,"key":"/defer-promise/-/defer-promise-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/defer-promise/download/defer-promise-1.0.1.tgz"},"maintainers":[{"name":"75lb","email":"75pound@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/defer-promise-1.0.1.tgz_1486070334680_0.20472807600162923"},"directories":{},"publish_time":1486070335304,"_cnpm_publish_time":1486070335304,"_hasShrinkwrap":false},"1.0.0":{"name":"defer-promise","author":{"name":"Lloyd Brookes","email":"75pound@gmail.com"},"version":"1.0.0","description":"defer-promise","repository":{"type":"git","url":"git+https://github.com/75lb/defer-promise.git"},"license":"MIT","main":"./lib/defer-promise.js","keywords":["defer","promise","es6","native","deferred"],"engines":{"node":">=0.10.0"},"scripts":{"test":"tape test/*.js","docs":"jsdoc2md -t jsdoc2md/README.hbs lib/*.js > README.md; echo"},"gitHead":"9dd35b7729255f2397c8d5860daa3ab63f6af4f7","bugs":{"url":"https://github.com/75lb/defer-promise/issues"},"homepage":"https://github.com/75lb/defer-promise#readme","_id":"defer-promise@1.0.0","_shasum":"43c94a8a3e1e2699a114ea86a18fa9d5f83bca85","_from":".","_npmVersion":"3.9.3","_nodeVersion":"6.2.1","_npmUser":{"name":"75lb","email":"75pound@gmail.com"},"dist":{"shasum":"43c94a8a3e1e2699a114ea86a18fa9d5f83bca85","size":1712,"noattachment":false,"key":"/defer-promise/-/defer-promise-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/defer-promise/download/defer-promise-1.0.0.tgz"},"maintainers":[{"name":"75lb","email":"75pound@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/defer-promise-1.0.0.tgz_1465114548244_0.25864325440488756"},"directories":{},"publish_time":1465114549998,"_cnpm_publish_time":1465114549998,"_hasShrinkwrap":false},"0.1.2":{"name":"defer-promise","author":{"name":"Lloyd Brookes","email":"75pound@gmail.com"},"version":"0.1.2","description":"defer-promise","repository":{"type":"git","url":"git+https://github.com/75lb/defer-promise.git"},"license":"MIT","main":"./lib/defer-promise.js","keywords":["defer","promise","es6","native","deferred"],"engines":{"node":">=0.10.0"},"scripts":{"test":"tape test/*.js","docs":"jsdoc2md -t jsdoc2md/README.hbs lib/*.js > README.md; echo"},"gitHead":"edd17dd8c283e9cb5cdc1153d2696cfcc705e448","bugs":{"url":"https://github.com/75lb/defer-promise/issues"},"homepage":"https://github.com/75lb/defer-promise#readme","_id":"defer-promise@0.1.2","_shasum":"12587314679ef3e1b7732a0eafe9a6c2e7a737ae","_from":".","_npmVersion":"3.5.3","_nodeVersion":"5.3.0","_npmUser":{"name":"75lb","email":"75pound@gmail.com"},"dist":{"shasum":"12587314679ef3e1b7732a0eafe9a6c2e7a737ae","size":1724,"noattachment":false,"key":"/defer-promise/-/defer-promise-0.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/defer-promise/download/defer-promise-0.1.2.tgz"},"maintainers":[{"name":"75lb","email":"75pound@gmail.com"}],"directories":{},"publish_time":1450628332074,"_cnpm_publish_time":1450628332074,"_hasShrinkwrap":false},"0.1.1":{"name":"defer-promise","author":{"name":"Lloyd Brookes","email":"75pound@gmail.com"},"version":"0.1.1","description":"defer-promise","repository":{"type":"git","url":"git+https://github.com/75lb/defer-promise.git"},"license":"MIT","main":"./lib/defer-promise.js","keywords":["defer","promise","es6","native","deferred"],"engines":{"node":">=0.10.0"},"scripts":{"test":"tape test/*.js","docs":"jsdoc2md -t jsdoc2md/README.hbs lib/*.js > README.md; echo"},"gitHead":"e428036cbd3513b44f3c46447e278f9633e0e2e9","bugs":{"url":"https://github.com/75lb/defer-promise/issues"},"homepage":"https://github.com/75lb/defer-promise#readme","_id":"defer-promise@0.1.1","_shasum":"7b7636b6108decb3ac03dd3f532c228b775bd368","_from":".","_npmVersion":"3.3.10","_nodeVersion":"4.2.1","_npmUser":{"name":"75lb","email":"75pound@gmail.com"},"dist":{"shasum":"7b7636b6108decb3ac03dd3f532c228b775bd368","size":1680,"noattachment":false,"key":"/defer-promise/-/defer-promise-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/defer-promise/download/defer-promise-0.1.1.tgz"},"maintainers":[{"name":"75lb","email":"75pound@gmail.com"}],"directories":{},"publish_time":1445793595577,"_cnpm_publish_time":1445793595577,"_hasShrinkwrap":false},"0.1.0":{"name":"defer-promise","author":{"name":"Lloyd Brookes","email":"75pound@gmail.com"},"version":"0.1.0","description":"defer-promise","repository":{"type":"git","url":"git+https://github.com/75lb/defer-promise.git"},"license":"MIT","main":"./lib/defer-promise.js","bin":{"defer-promise":"bin/cli.js"},"keywords":[],"engines":{"node":">=0.10.0"},"scripts":{"test":"tape test/*.js","docs":"jsdoc2md -t jsdoc2md/README.hbs lib/*.js > README.md; echo"},"gitHead":"6277d7efd787ee7731de71342509104bba9760cd","bugs":{"url":"https://github.com/75lb/defer-promise/issues"},"homepage":"https://github.com/75lb/defer-promise#readme","_id":"defer-promise@0.1.0","_shasum":"b08dbc404569962066074c11cba0d6a9040da1fd","_from":".","_npmVersion":"3.3.10","_nodeVersion":"4.2.1","_npmUser":{"name":"75lb","email":"75pound@gmail.com"},"dist":{"shasum":"b08dbc404569962066074c11cba0d6a9040da1fd","size":1711,"noattachment":false,"key":"/defer-promise/-/defer-promise-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/defer-promise/download/defer-promise-0.1.0.tgz"},"maintainers":[{"name":"75lb","email":"75pound@gmail.com"}],"directories":{},"publish_time":1445793256507,"_cnpm_publish_time":1445793256507,"_hasShrinkwrap":false}},"readme":"[![view on npm](http://img.shields.io/npm/v/defer-promise.svg)](https://www.npmjs.org/package/defer-promise)\n[![npm module month](http://img.shields.io/npm/dt/defer-promise.svg)](https://www.npmjs.org/package/defer-promise)\n[![Build Status](https://travis-ci.org/75lb/defer-promise.svg?branch=master)](https://travis-ci.org/75lb/defer-promise)\n[![Dependency Status](https://david-dm.org/75lb/defer-promise.svg)](https://david-dm.org/75lb/defer-promise)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](https://github.com/feross/standard)\n\n# defer-promise\n\nIsomorphic function returning a deferred promise with `resolve` and `reject` methods. If the global `Promise.defer()` method exists it will use that, else polyfill.\n\n```js\nconst defer = require('defer-promise')\nconst deferred = defer()\n\ndoSomething((result, err) => {\n  if (err) {\n    deferred.reject(err)\n  } else {\n    deferred.resolve(result)\n  }\n})\n\nreturn deferred.promise;\n```\n\n## Load anywhere\n\nThis library can be loaded anywhere, natively without transpilation.\n\nNode.js:\n\n```js\nconst defer = require('defer-promise')\n```\n\nNode.js with ECMAScript Module support enabled:\n\n```js\nimport defer from 'defer-promise'\n```\n\nModern browser ECMAScript Module:\n\n```js\nimport defer from './node_modules/defer-promise/index.mjs'\n```\n\nOld browser (adds `window.defer`):\n\n```html\n<script nomodule src=\"./node_modules/defer-promise/dist/index.js\"></script>\n```\n\n* * *\n\n&copy; 2015-18 Lloyd Brookes \\<75pound@gmail.com\\>. Documented by [jsdoc-to-markdown](https://github.com/jsdoc2md/jsdoc-to-markdown).\n","_attachments":{},"homepage":"https://github.com/75lb/defer-promise#readme","bugs":{"url":"https://github.com/75lb/defer-promise/issues"},"license":"MIT"}