{"ast":null,"code":"var wrappy = require('wrappy');\n\nvar reqs = Object.create(null);\n\nvar once = require('once');\n\nmodule.exports = wrappy(inflight);\n\nfunction inflight(key, cb) {\n if (reqs[key]) {\n reqs[key].push(cb);\n return null;\n } else {\n reqs[key] = [cb];\n return makeres(key);\n }\n}\n\nfunction makeres(key) {\n return once(function RES() {\n var cbs = reqs[key];\n var len = cbs.length;\n var args = slice(arguments); // XXX It's somewhat ambiguous whether a new callback added in this\n // pass should be queued for later execution if something in the\n // list of callbacks throws, or if it should just be discarded.\n // However, it's such an edge case that it hardly matters, and either\n // choice is likely as surprising as the other.\n // As it happens, we do go ahead and schedule it for later execution.\n\n try {\n for (var i = 0; i < len; i++) {\n cbs[i].apply(null, args);\n }\n } finally {\n if (cbs.length > len) {\n // added more in the interim.\n // de-zalgo, just in case, but don't call again.\n cbs.splice(0, len);\n process.nextTick(function () {\n RES.apply(null, args);\n });\n } else {\n delete reqs[key];\n }\n }\n });\n}\n\nfunction slice(args) {\n var length = args.length;\n var array = [];\n\n for (var i = 0; i < length; i++) array[i] = args[i];\n\n return array;\n}","map":{"version":3,"sources":["/Users/tylerkoenig/Code/personal/react-scss2/node_modules/inflight/inflight.js"],"names":["wrappy","require","reqs","Object","create","once","module","exports","inflight","key","cb","push","makeres","RES","cbs","len","length","args","slice","arguments","i","apply","splice","process","nextTick","array"],"mappings":"AAAA,IAAIA,MAAM,GAAGC,OAAO,CAAC,QAAD,CAApB;;AACA,IAAIC,IAAI,GAAGC,MAAM,CAACC,MAAP,CAAc,IAAd,CAAX;;AACA,IAAIC,IAAI,GAAGJ,OAAO,CAAC,MAAD,CAAlB;;AAEAK,MAAM,CAACC,OAAP,GAAiBP,MAAM,CAACQ,QAAD,CAAvB;;AAEA,SAASA,QAAT,CAAmBC,GAAnB,EAAwBC,EAAxB,EAA4B;AAC1B,MAAIR,IAAI,CAACO,GAAD,CAAR,EAAe;AACbP,IAAAA,IAAI,CAACO,GAAD,CAAJ,CAAUE,IAAV,CAAe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Af;;AACjC,SAAOK,KAAP;AACD","sourcesContent":["var wrappy = require('wrappy')\nvar reqs = Object.create(null)\nvar once = require('once')\n\nmodule.exports = wrappy(inflight)\n\nfunction inflight (key, cb) {\n if (reqs[key]) {\n reqs[key].push(cb)\n return null\n } else {\n reqs[key] = [cb]\n return makeres(key)\n }\n}\n\nfunction makeres (key) {\n return once(function RES () {\n var cbs = reqs[key]\n var len = cbs.length\n var args = slice(arguments)\n\n // XXX It's somewhat ambiguous whether a new callback added in this\n // pass should be queued for later execution if something in the\n // list of callbacks throws, or if it should just be discarded.\n // However, it's such an edge case that it hardly matters, and either\n // choice is likely as surprising as the other.\n // As it happens, we do go ahead and schedule it for later execution.\n try {\n for (var i = 0; i < len; i++) {\n cbs[i].apply(null, args)\n }\n } finally {\n if (cbs.length > len) {\n // added more in the interim.\n // de-zalgo, just in case, but don't call again.\n cbs.splice(0, len)\n process.nextTick(function () {\n RES.apply(null, args)\n })\n } else {\n delete reqs[key]\n }\n }\n })\n}\n\nfunction slice (args) {\n var length = args.length\n var array = []\n\n for (var i = 0; i < length; i++) array[i] = args[i]\n return array\n}\n"]},"metadata":{},"sourceType":"script"}