1 line
10 KiB
JSON
1 line
10 KiB
JSON
{"id":"../node_modules/balanced-match/index.js","dependencies":[{"name":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/package.json","includedInParent":true,"mtime":1545395695572},{"name":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/balanced-match/package.json","includedInParent":true,"mtime":1545395357162}],"generated":{"js":"'use strict';\nmodule.exports = balanced;\nfunction balanced(a, b, str) {\n if (a instanceof RegExp) a = maybeMatch(a, str);\n if (b instanceof RegExp) b = maybeMatch(b, str);\n\n var r = range(a, b, str);\n\n return r && {\n start: r[0],\n end: r[1],\n pre: str.slice(0, r[0]),\n body: str.slice(r[0] + a.length, r[1]),\n post: str.slice(r[1] + b.length)\n };\n}\n\nfunction maybeMatch(reg, str) {\n var m = str.match(reg);\n return m ? m[0] : null;\n}\n\nbalanced.range = range;\nfunction range(a, b, str) {\n var begs, beg, left, right, result;\n var ai = str.indexOf(a);\n var bi = str.indexOf(b, ai + 1);\n var i = ai;\n\n if (ai >= 0 && bi > 0) {\n begs = [];\n left = str.length;\n\n while (i >= 0 && !result) {\n if (i == ai) {\n begs.push(i);\n ai = str.indexOf(a, i + 1);\n } else if (begs.length == 1) {\n result = [ begs.pop(), bi ];\n } else {\n beg = begs.pop();\n if (beg < left) {\n left = beg;\n right = bi;\n }\n\n bi = str.indexOf(b, i + 1);\n }\n\n i = ai < bi && ai >= 0 ? ai : bi;\n }\n\n if (begs.length) {\n result = [ left, right ];\n }\n }\n\n return result;\n}\n","map":{"mappings":[{"source":"../node_modules/balanced-match/index.js","original":{"line":1,"column":0},"generated":{"line":1,"column":0}},{"source":"../node_modules/balanced-match/index.js","original":{"line":2,"column":0},"generated":{"line":2,"column":0}},{"source":"../node_modules/balanced-match/index.js","original":{"line":3,"column":0},"generated":{"line":3,"column":0}},{"source":"../node_modules/balanced-match/index.js","original":{"line":4,"column":0},"generated":{"line":4,"column":0}},{"source":"../node_modules/balanced-match/index.js","original":{"line":5,"column":0},"generated":{"line":5,"column":0}},{"source":"../node_modules/balanced-match/index.js","original":{"line":6,"column":0},"generated":{"line":6,"column":0}},{"source":"../node_modules/balanced-match/index.js","original":{"line":7,"column":0},"generated":{"line":7,"column":0}},{"source":"../node_modules/balanced-match/index.js","original":{"line":8,"column":0},"generated":{"line":8,"column":0}},{"source":"../node_modules/balanced-match/index.js","original":{"line":9,"column":0},"generated":{"line":9,"column":0}},{"source":"../node_modules/balanced-match/index.js","original":{"line":10,"column":0},"generated":{"line":10,"column":0}},{"source":"../node_modules/balanced-match/index.js","original":{"line":11,"column":0},"generated":{"line":11,"column":0}},{"source":"../node_modules/balanced-match/index.js","original":{"line":12,"column":0},"generated":{"line":12,"column":0}},{"source":"../node_modules/balanced-match/index.js","original":{"line":13,"column":0},"generated":{"line":13,"column":0}},{"source":"../node_modules/balanced-match/index.js","original":{"line":14,"column":0},"generated":{"line":14,"column":0}},{"source":"../node_modules/balanced-match/index.js","original":{"line":15,"column":0},"generated":{"line":15,"column":0}},{"source":"../node_modules/balanced-match/index.js","original":{"line":16,"column":0},"generated":{"line":16,"column":0}},{"source":"../node_modules/balanced-match/index.js","original":{"line":17,"column":0},"generated":{"line":17,"column":0}},{"source":"../node_modules/balanced-match/index.js","original":{"line":18,"column":0},"generated":{"line":18,"column":0}},{"source":"../node_modules/balanced-match/index.js","original":{"line":19,"column":0},"generated":{"line":19,"column":0}},{"source":"../node_modules/balanced-match/index.js","original":{"line":20,"column":0},"generated":{"line":20,"column":0}},{"source":"../node_modules/balanced-match/index.js","original":{"line":21,"column":0},"generated":{"line":21,"column":0}},{"source":"../node_modules/balanced-match/index.js","original":{"line":22,"column":0},"generated":{"line":22,"column":0}},{"source":"../node_modules/balanced-match/index.js","original":{"line":23,"column":0},"generated":{"line":23,"column":0}},{"source":"../node_modules/balanced-match/index.js","original":{"line":24,"column":0},"generated":{"line":24,"column":0}},{"source":"../node_modules/balanced-match/index.js","original":{"line":25,"column":0},"generated":{"line":25,"column":0}},{"source":"../node_modules/balanced-match/index.js","original":{"line":26,"column":0},"generated":{"line":26,"column":0}},{"source":"../node_modules/balanced-match/index.js","original":{"line":27,"column":0},"generated":{"line":27,"column":0}},{"source":"../node_modules/balanced-match/index.js","original":{"line":28,"column":0},"generated":{"line":28,"column":0}},{"source":"../node_modules/balanced-match/index.js","original":{"line":29,"column":0},"generated":{"line":29,"column":0}},{"source":"../node_modules/balanced-match/index.js","original":{"line":30,"column":0},"generated":{"line":30,"column":0}},{"source":"../node_modules/balanced-match/index.js","original":{"line":31,"column":0},"generated":{"line":31,"column":0}},{"source":"../node_modules/balanced-match/index.js","original":{"line":32,"column":0},"generated":{"line":32,"column":0}},{"source":"../node_modules/balanced-match/index.js","original":{"line":33,"column":0},"generated":{"line":33,"column":0}},{"source":"../node_modules/balanced-match/index.js","original":{"line":34,"column":0},"generated":{"line":34,"column":0}},{"source":"../node_modules/balanced-match/index.js","original":{"line":35,"column":0},"generated":{"line":35,"column":0}},{"source":"../node_modules/balanced-match/index.js","original":{"line":36,"column":0},"generated":{"line":36,"column":0}},{"source":"../node_modules/balanced-match/index.js","original":{"line":37,"column":0},"generated":{"line":37,"column":0}},{"source":"../node_modules/balanced-match/index.js","original":{"line":38,"column":0},"generated":{"line":38,"column":0}},{"source":"../node_modules/balanced-match/index.js","original":{"line":39,"column":0},"generated":{"line":39,"column":0}},{"source":"../node_modules/balanced-match/index.js","original":{"line":40,"column":0},"generated":{"line":40,"column":0}},{"source":"../node_modules/balanced-match/index.js","original":{"line":41,"column":0},"generated":{"line":41,"column":0}},{"source":"../node_modules/balanced-match/index.js","original":{"line":42,"column":0},"generated":{"line":42,"column":0}},{"source":"../node_modules/balanced-match/index.js","original":{"line":43,"column":0},"generated":{"line":43,"column":0}},{"source":"../node_modules/balanced-match/index.js","original":{"line":44,"column":0},"generated":{"line":44,"column":0}},{"source":"../node_modules/balanced-match/index.js","original":{"line":45,"column":0},"generated":{"line":45,"column":0}},{"source":"../node_modules/balanced-match/index.js","original":{"line":46,"column":0},"generated":{"line":46,"column":0}},{"source":"../node_modules/balanced-match/index.js","original":{"line":47,"column":0},"generated":{"line":47,"column":0}},{"source":"../node_modules/balanced-match/index.js","original":{"line":48,"column":0},"generated":{"line":48,"column":0}},{"source":"../node_modules/balanced-match/index.js","original":{"line":49,"column":0},"generated":{"line":49,"column":0}},{"source":"../node_modules/balanced-match/index.js","original":{"line":50,"column":0},"generated":{"line":50,"column":0}},{"source":"../node_modules/balanced-match/index.js","original":{"line":51,"column":0},"generated":{"line":51,"column":0}},{"source":"../node_modules/balanced-match/index.js","original":{"line":52,"column":0},"generated":{"line":52,"column":0}},{"source":"../node_modules/balanced-match/index.js","original":{"line":53,"column":0},"generated":{"line":53,"column":0}},{"source":"../node_modules/balanced-match/index.js","original":{"line":54,"column":0},"generated":{"line":54,"column":0}},{"source":"../node_modules/balanced-match/index.js","original":{"line":55,"column":0},"generated":{"line":55,"column":0}},{"source":"../node_modules/balanced-match/index.js","original":{"line":56,"column":0},"generated":{"line":56,"column":0}},{"source":"../node_modules/balanced-match/index.js","original":{"line":57,"column":0},"generated":{"line":57,"column":0}},{"source":"../node_modules/balanced-match/index.js","original":{"line":58,"column":0},"generated":{"line":58,"column":0}},{"source":"../node_modules/balanced-match/index.js","original":{"line":59,"column":0},"generated":{"line":59,"column":0}},{"source":"../node_modules/balanced-match/index.js","original":{"line":60,"column":0},"generated":{"line":60,"column":0}}],"sources":{"../node_modules/balanced-match/index.js":"'use strict';\nmodule.exports = balanced;\nfunction balanced(a, b, str) {\n if (a instanceof RegExp) a = maybeMatch(a, str);\n if (b instanceof RegExp) b = maybeMatch(b, str);\n\n var r = range(a, b, str);\n\n return r && {\n start: r[0],\n end: r[1],\n pre: str.slice(0, r[0]),\n body: str.slice(r[0] + a.length, r[1]),\n post: str.slice(r[1] + b.length)\n };\n}\n\nfunction maybeMatch(reg, str) {\n var m = str.match(reg);\n return m ? m[0] : null;\n}\n\nbalanced.range = range;\nfunction range(a, b, str) {\n var begs, beg, left, right, result;\n var ai = str.indexOf(a);\n var bi = str.indexOf(b, ai + 1);\n var i = ai;\n\n if (ai >= 0 && bi > 0) {\n begs = [];\n left = str.length;\n\n while (i >= 0 && !result) {\n if (i == ai) {\n begs.push(i);\n ai = str.indexOf(a, i + 1);\n } else if (begs.length == 1) {\n result = [ begs.pop(), bi ];\n } else {\n beg = begs.pop();\n if (beg < left) {\n left = beg;\n right = bi;\n }\n\n bi = str.indexOf(b, i + 1);\n }\n\n i = ai < bi && ai >= 0 ? ai : bi;\n }\n\n if (begs.length) {\n result = [ left, right ];\n }\n }\n\n return result;\n}\n"},"lineCount":60}},"hash":"5448683cc3459342c001d43df6a87854","cacheData":{"env":{}}} |