{"name":"promise-inflight","version":"1.0.1","description":"One promise for multiple requests in flight to avoid async duplication","main":"inflight.js","files":["inflight.js"],"license":"ISC","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":[],"author":{"name":"Rebecca Turner","email":"me@re-becca.org","url":"http://re-becca.org/"},"devDependencies":{},"repository":{"type":"git","url":"git+https://github.com/iarna/promise-inflight.git"},"bugs":{"url":"https://github.com/iarna/promise-inflight/issues"},"homepage":"https://github.com/iarna/promise-inflight#readme","gitHead":"9de9f26d8ecfe28d067cbd84630676dfea415e4a","_id":"promise-inflight@1.0.1","_shasum":"98472870bf228132fcbdd868129bad12c3c029e3","_from":".","_npmVersion":"4.4.0","_nodeVersion":"4.6.1","_npmUser":{"name":"iarna","email":"me@re-becca.org"},"dist":{"shasum":"98472870bf228132fcbdd868129bad12c3c029e3","tarball":"http://registry-npm.ywwl.com/promise-inflight/download/promise-inflight-1.0.1.tgz","integrity":"sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDdt7Mgt9HGKcg2R7EJBA7sAfQN0t7d6dgzqrTejEyO9AIgNx0QiEdBOgse55Zdie4m9YJs1zZ51DAI9tEOOVZFy4c="}],"size":1668,"noattachment":false,"key":"/promise-inflight/-/promise-inflight-1.0.1.tgz"},"maintainers":[{"name":"iarna","email":"me@re-becca.org"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/promise-inflight-1.0.1.tgz_1488077339544_0.4008405189961195"},"directories":{},"readme":"# promise-inflight\n\nOne promise for multiple requests in flight to avoid async duplication\n\n## USAGE\n\n```javascript\nconst inflight = require('promise-inflight')\n\n// some request that does some stuff\nfunction req(key) {\n  // key is any random string.  like a url or filename or whatever.\n  return inflight(key, () => {\n    // this is where you'd fetch the url or whatever\n    return Promise.delay(100)\n  })\n}\n\n// only assigns a single setTimeout\n// when it dings, all thens get called with the same result.  (There's only\n// one underlying promise.)\nreq('foo').then(…)\nreq('foo').then(…)\nreq('foo').then(…)\nreq('foo').then(…)\n```\n\n## SEE ALSO\n\n* [inflight](https://npmjs.com/package/inflight) - For the callback based function on which this is based.\n\n## STILL NEEDS\n\nTests!\n","publish_time":1488077339798,"_cnpm_publish_time":1488077339798,"dist-tags":{"latest":"1.0.1"}}