summaryrefslogtreecommitdiff
path: root/deps/node/deps/npm/node_modules/inflight
diff options
context:
space:
mode:
Diffstat (limited to 'deps/node/deps/npm/node_modules/inflight')
-rw-r--r--deps/node/deps/npm/node_modules/inflight/LICENSE15
-rw-r--r--deps/node/deps/npm/node_modules/inflight/README.md37
-rw-r--r--deps/node/deps/npm/node_modules/inflight/inflight.js54
-rw-r--r--deps/node/deps/npm/node_modules/inflight/package.json62
4 files changed, 0 insertions, 168 deletions
diff --git a/deps/node/deps/npm/node_modules/inflight/LICENSE b/deps/node/deps/npm/node_modules/inflight/LICENSE
deleted file mode 100644
index 05eeeb88..00000000
--- a/deps/node/deps/npm/node_modules/inflight/LICENSE
+++ /dev/null
@@ -1,15 +0,0 @@
-The ISC License
-
-Copyright (c) Isaac Z. Schlueter
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
-IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/deps/node/deps/npm/node_modules/inflight/README.md b/deps/node/deps/npm/node_modules/inflight/README.md
deleted file mode 100644
index 6dc89291..00000000
--- a/deps/node/deps/npm/node_modules/inflight/README.md
+++ /dev/null
@@ -1,37 +0,0 @@
-# inflight
-
-Add callbacks to requests in flight to avoid async duplication
-
-## USAGE
-
-```javascript
-var inflight = require('inflight')
-
-// some request that does some stuff
-function req(key, callback) {
- // key is any random string. like a url or filename or whatever.
- //
- // will return either a falsey value, indicating that the
- // request for this key is already in flight, or a new callback
- // which when called will call all callbacks passed to inflightk
- // with the same key
- callback = inflight(key, callback)
-
- // If we got a falsey value back, then there's already a req going
- if (!callback) return
-
- // this is where you'd fetch the url or whatever
- // callback is also once()-ified, so it can safely be assigned
- // to multiple events etc. First call wins.
- setTimeout(function() {
- callback(null, key)
- }, 100)
-}
-
-// only assigns a single setTimeout
-// when it dings, all cbs get called
-req('foo', cb1)
-req('foo', cb2)
-req('foo', cb3)
-req('foo', cb4)
-```
diff --git a/deps/node/deps/npm/node_modules/inflight/inflight.js b/deps/node/deps/npm/node_modules/inflight/inflight.js
deleted file mode 100644
index 48202b3c..00000000
--- a/deps/node/deps/npm/node_modules/inflight/inflight.js
+++ /dev/null
@@ -1,54 +0,0 @@
-var wrappy = require('wrappy')
-var reqs = Object.create(null)
-var once = require('once')
-
-module.exports = wrappy(inflight)
-
-function inflight (key, cb) {
- if (reqs[key]) {
- reqs[key].push(cb)
- return null
- } else {
- reqs[key] = [cb]
- return makeres(key)
- }
-}
-
-function makeres (key) {
- return once(function RES () {
- var cbs = reqs[key]
- var len = cbs.length
- var args = slice(arguments)
-
- // XXX It's somewhat ambiguous whether a new callback added in this
- // pass should be queued for later execution if something in the
- // list of callbacks throws, or if it should just be discarded.
- // However, it's such an edge case that it hardly matters, and either
- // choice is likely as surprising as the other.
- // As it happens, we do go ahead and schedule it for later execution.
- try {
- for (var i = 0; i < len; i++) {
- cbs[i].apply(null, args)
- }
- } finally {
- if (cbs.length > len) {
- // added more in the interim.
- // de-zalgo, just in case, but don't call again.
- cbs.splice(0, len)
- process.nextTick(function () {
- RES.apply(null, args)
- })
- } else {
- delete reqs[key]
- }
- }
- })
-}
-
-function slice (args) {
- var length = args.length
- var array = []
-
- for (var i = 0; i < length; i++) array[i] = args[i]
- return array
-}
diff --git a/deps/node/deps/npm/node_modules/inflight/package.json b/deps/node/deps/npm/node_modules/inflight/package.json
deleted file mode 100644
index d31d230a..00000000
--- a/deps/node/deps/npm/node_modules/inflight/package.json
+++ /dev/null
@@ -1,62 +0,0 @@
-{
- "_args": [
- [
- "inflight@1.0.6",
- "/Users/rebecca/code/npm"
- ]
- ],
- "_from": "inflight@1.0.6",
- "_id": "inflight@1.0.6",
- "_inBundle": false,
- "_integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
- "_location": "/inflight",
- "_phantomChildren": {},
- "_requested": {
- "type": "version",
- "registry": true,
- "raw": "inflight@1.0.6",
- "name": "inflight",
- "escapedName": "inflight",
- "rawSpec": "1.0.6",
- "saveSpec": null,
- "fetchSpec": "1.0.6"
- },
- "_requiredBy": [
- "/",
- "/glob"
- ],
- "_resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
- "_spec": "1.0.6",
- "_where": "/Users/rebecca/code/npm",
- "author": {
- "name": "Isaac Z. Schlueter",
- "email": "i@izs.me",
- "url": "http://blog.izs.me/"
- },
- "bugs": {
- "url": "https://github.com/isaacs/inflight/issues"
- },
- "dependencies": {
- "once": "^1.3.0",
- "wrappy": "1"
- },
- "description": "Add callbacks to requests in flight to avoid async duplication",
- "devDependencies": {
- "tap": "^7.1.2"
- },
- "files": [
- "inflight.js"
- ],
- "homepage": "https://github.com/isaacs/inflight",
- "license": "ISC",
- "main": "inflight.js",
- "name": "inflight",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/npm/inflight.git"
- },
- "scripts": {
- "test": "tap test.js --100"
- },
- "version": "1.0.6"
-}