{ "_id": "inflight", "_rev": "33-ad7dc5aca6f9108f9bd7bc91b9e24971", "name": "inflight", "description": "Add callbacks to requests in flight to avoid async duplication", "dist-tags": { "latest": "1.0.6" }, "versions": { "1.0.0": { "name": "inflight", "version": "1.0.0", "description": "Add callbacks to requests in flight to avoid async duplication", "main": "inflight.js", "dependencies": { "once": "^1.3.0" }, "devDependencies": { "tap": "^0.4.10" }, "scripts": { "test": "tap test.js" }, "repository": { "type": "git", "url": "git://github.com/isaacs/inflight" }, "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me", "url": "http://blog.izs.me/" }, "bugs": { "url": "https://github.com/isaacs/inflight/issues" }, "homepage": "https://github.com/isaacs/inflight", "license": "ISC", "_id": "inflight@1.0.0", "_shasum": "002f6df5129a7f4bf3e1b471bec5334804a2dd99", "_from": ".", "_npmVersion": "1.4.9", "_npmUser": { "name": "isaacs", "email": "i@izs.me" }, "maintainers": [ { "name": "isaacs", "email": "i@izs.me" } ], "dist": { "shasum": "002f6df5129a7f4bf3e1b471bec5334804a2dd99", "tarball": "https://registry.npmjs.org/inflight/-/inflight-1.0.0.tgz" }, "directories": {} }, "1.0.1": { "name": "inflight", "version": "1.0.1", "description": "Add callbacks to requests in flight to avoid async duplication", "main": "inflight.js", "dependencies": { "once": "^1.3.0" }, "devDependencies": { "tap": "^0.4.10" }, "scripts": { "test": "tap test.js" }, "repository": { "type": "git", "url": "git://github.com/isaacs/inflight" }, "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me", "url": "http://blog.izs.me/" }, "bugs": { "url": "https://github.com/isaacs/inflight/issues" }, "homepage": "https://github.com/isaacs/inflight", "license": "ISC", "_id": "inflight@1.0.1", "_shasum": "01f6911821535243c790ac0f998f54e9023ffb6f", "_from": ".", "_npmVersion": "1.4.9", "_npmUser": { "name": "isaacs", "email": "i@izs.me" }, "maintainers": [ { "name": "isaacs", "email": "i@izs.me" } ], "dist": { "shasum": "01f6911821535243c790ac0f998f54e9023ffb6f", "tarball": "https://registry.npmjs.org/inflight/-/inflight-1.0.1.tgz" }, "directories": {} }, "1.0.2": { "name": "inflight", "version": "1.0.2", "description": "Add callbacks to requests in flight to avoid async duplication", "main": "inflight.js", "dependencies": { "once": "^1.3.0", "wrappy": "1" }, "devDependencies": { "tap": "^0.4.10" }, "scripts": { "test": "tap test.js" }, "repository": { "type": "git", "url": "git://github.com/isaacs/inflight" }, "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me", "url": "http://blog.izs.me/" }, "bugs": { "url": "https://github.com/isaacs/inflight/issues" }, "homepage": "https://github.com/isaacs/inflight", "license": "ISC", "gitHead": "f0c2b45a3924e4438d4c97d43acca1341be9354b", "_id": "inflight@1.0.2", "_shasum": "6d1d147db188760100f13e670ca0dfbd2b63d169", "_from": ".", "_npmVersion": "2.0.0", "_nodeVersion": "0.10.31", "_npmUser": { "name": "isaacs", "email": "i@izs.me" }, "maintainers": [ { "name": "isaacs", "email": "i@izs.me" } ], "dist": { "shasum": "6d1d147db188760100f13e670ca0dfbd2b63d169", "tarball": "https://registry.npmjs.org/inflight/-/inflight-1.0.2.tgz" }, "directories": {} }, "1.0.3": { "name": "inflight", "version": "1.0.3", "description": "Add callbacks to requests in flight to avoid async duplication", "main": "inflight.js", "dependencies": { "once": "^1.3.0", "wrappy": "1" }, "devDependencies": { "tap": "^0.4.10" }, "scripts": { "test": "tap test.js" }, "repository": { "type": "git", "url": "git://github.com/isaacs/inflight" }, "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me", "url": "http://blog.izs.me/" }, "bugs": { "url": "https://github.com/isaacs/inflight/issues" }, "homepage": "https://github.com/isaacs/inflight", "license": "ISC", "gitHead": "a10cb02457ed415c9019d185902ec3db85b03984", "_id": "inflight@1.0.3", "_shasum": "70374be8ef3316248f37fa81276b6b329b95ff49", "_from": ".", "_npmVersion": "2.1.2", "_nodeVersion": "0.10.32", "_npmUser": { "name": "othiym23", "email": "ogd@aoaioxxysz.net" }, "maintainers": [ { "name": "isaacs", "email": "i@izs.me" }, { "name": "othiym23", "email": "ogd@aoaioxxysz.net" }, { "name": "iarna", "email": "me@re-becca.org" } ], "dist": { "shasum": "70374be8ef3316248f37fa81276b6b329b95ff49", "tarball": "https://registry.npmjs.org/inflight/-/inflight-1.0.3.tgz" }, "directories": {} }, "1.0.4": { "name": "inflight", "version": "1.0.4", "description": "Add callbacks to requests in flight to avoid async duplication", "main": "inflight.js", "dependencies": { "once": "^1.3.0", "wrappy": "1" }, "devDependencies": { "tap": "^0.4.10" }, "scripts": { "test": "tap test.js" }, "repository": { "type": "git", "url": "git://github.com/isaacs/inflight" }, "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me", "url": "http://blog.izs.me/" }, "bugs": { "url": "https://github.com/isaacs/inflight/issues" }, "homepage": "https://github.com/isaacs/inflight", "license": "ISC", "gitHead": "c7b5531d572a867064d4a1da9e013e8910b7d1ba", "_id": "inflight@1.0.4", "_shasum": "6cbb4521ebd51ce0ec0a936bfd7657ef7e9b172a", "_from": ".", "_npmVersion": "2.1.3", "_nodeVersion": "0.10.32", "_npmUser": { "name": "othiym23", "email": "ogd@aoaioxxysz.net" }, "maintainers": [ { "name": "isaacs", "email": "i@izs.me" }, { "name": "othiym23", "email": "ogd@aoaioxxysz.net" }, { "name": "iarna", "email": "me@re-becca.org" } ], "dist": { "shasum": "6cbb4521ebd51ce0ec0a936bfd7657ef7e9b172a", "tarball": "https://registry.npmjs.org/inflight/-/inflight-1.0.4.tgz" }, "directories": {} }, "1.0.5": { "name": "inflight", "version": "1.0.5", "description": "Add callbacks to requests in flight to avoid async duplication", "main": "inflight.js", "files": [ "inflight.js" ], "dependencies": { "once": "^1.3.0", "wrappy": "1" }, "devDependencies": { "tap": "^1.2.0" }, "scripts": { "test": "tap test.js" }, "repository": { "type": "git", "url": "git+https://github.com/npm/inflight.git" }, "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me", "url": "http://blog.izs.me/" }, "bugs": { "url": "https://github.com/isaacs/inflight/issues" }, "homepage": "https://github.com/isaacs/inflight", "license": "ISC", "gitHead": "559e37b4f6327fca797fe8d7fe8ed6d9cae08821", "_id": "inflight@1.0.5", "_shasum": "db3204cd5a9de2e6cd890b85c6e2f66bcf4f620a", "_from": ".", "_npmVersion": "3.9.1", "_nodeVersion": "5.10.1", "_npmUser": { "name": "zkat", "email": "kat@sykosomatic.org" }, "dist": { "shasum": "db3204cd5a9de2e6cd890b85c6e2f66bcf4f620a", "tarball": "https://registry.npmjs.org/inflight/-/inflight-1.0.5.tgz" }, "maintainers": [ { "name": "iarna", "email": "me@re-becca.org" }, { "name": "isaacs", "email": "i@izs.me" }, { "name": "othiym23", "email": "ogd@aoaioxxysz.net" }, { "name": "zkat", "email": "kat@sykosomatic.org" } ], "_npmOperationalInternal": { "host": "packages-12-west.internal.npmjs.com", "tmp": "tmp/inflight-1.0.5.tgz_1463529611443_0.00041943578980863094" }, "directories": {} }, "1.0.6": { "name": "inflight", "version": "1.0.6", "description": "Add callbacks to requests in flight to avoid async duplication", "main": "inflight.js", "files": [ "inflight.js" ], "dependencies": { "once": "^1.3.0", "wrappy": "1" }, "devDependencies": { "tap": "^7.1.2" }, "scripts": { "test": "tap test.js --100" }, "repository": { "type": "git", "url": "git+https://github.com/npm/inflight.git" }, "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me", "url": "http://blog.izs.me/" }, "bugs": { "url": "https://github.com/isaacs/inflight/issues" }, "homepage": "https://github.com/isaacs/inflight", "license": "ISC", "gitHead": "a547881738c8f57b27795e584071d67cf6ac1a57", "_id": "inflight@1.0.6", "_shasum": "49bd6331d7d02d0c09bc910a1075ba8165b56df9", "_from": ".", "_npmVersion": "3.10.7", "_nodeVersion": "6.5.0", "_npmUser": { "name": "isaacs", "email": "i@izs.me" }, "dist": { "shasum": "49bd6331d7d02d0c09bc910a1075ba8165b56df9", "tarball": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz" }, "maintainers": [ { "name": "iarna", "email": "me@re-becca.org" }, { "name": "isaacs", "email": "i@izs.me" }, { "name": "othiym23", "email": "ogd@aoaioxxysz.net" }, { "name": "zkat", "email": "kat@sykosomatic.org" } ], "_npmOperationalInternal": { "host": "packages-16-east.internal.npmjs.com", "tmp": "tmp/inflight-1.0.6.tgz_1476330807696_0.10388551792129874" }, "directories": {} } }, "readme": "# inflight\n\nAdd callbacks to requests in flight to avoid async duplication\n\n## USAGE\n\n```javascript\nvar inflight = require('inflight')\n\n// some request that does some stuff\nfunction req(key, callback) {\n // key is any random string. like a url or filename or whatever.\n //\n // will return either a falsey value, indicating that the\n // request for this key is already in flight, or a new callback\n // which when called will call all callbacks passed to inflightk\n // with the same key\n callback = inflight(key, callback)\n\n // If we got a falsey value back, then there's already a req going\n if (!callback) return\n\n // this is where you'd fetch the url or whatever\n // callback is also once()-ified, so it can safely be assigned\n // to multiple events etc. First call wins.\n setTimeout(function() {\n callback(null, key)\n }, 100)\n}\n\n// only assigns a single setTimeout\n// when it dings, all cbs get called\nreq('foo', cb1)\nreq('foo', cb2)\nreq('foo', cb3)\nreq('foo', cb4)\n```\n", "maintainers": [ { "email": "quitlahok@gmail.com", "name": "nlf" }, { "email": "ruyadorno@hotmail.com", "name": "ruyadorno" }, { "email": "darcy@darcyclarke.me", "name": "darcyclarke" }, { "email": "evilpacket@gmail.com", "name": "adam_baldwin" }, { "email": "i@izs.me", "name": "isaacs" } ], "time": { "modified": "2020-10-13T05:04:27.266Z", "created": "2014-05-05T03:04:32.021Z", "1.0.0": "2014-05-05T03:04:32.021Z", "1.0.1": "2014-05-05T20:14:07.678Z", "1.0.2": "2014-09-18T23:07:30.791Z", "1.0.3": "2014-10-01T23:59:18.702Z", "1.0.4": "2014-10-03T06:50:17.203Z", "1.0.5": "2016-05-18T00:00:12.031Z", "1.0.6": "2016-10-13T03:53:29.524Z" }, "homepage": "https://github.com/isaacs/inflight", "repository": { "type": "git", "url": "git+https://github.com/npm/inflight.git" }, "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me", "url": "http://blog.izs.me/" }, "bugs": { "url": "https://github.com/isaacs/inflight/issues" }, "license": "ISC", "readmeFilename": "README.md", "users": { "program247365": true, "wenbing": true, "mojaray2k": true, "sbruchmann": true } }