webdetector/.cache/1c/89ea31bf0414626e78857a04a2be44.json

1 line
8.0 KiB
JSON
Raw Normal View History

2018-12-21 12:36:28 +00:00
{"id":"../node_modules/@pushrocks/lik/dist/lik.stringmap.js","dependencies":[{"name":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/@pushrocks/lik/ts/lik.stringmap.ts","includedInParent":true,"mtime":499162500000},{"name":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/package.json","includedInParent":true,"mtime":1545395695572},{"name":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/@pushrocks/lik/package.json","includedInParent":true,"mtime":1545395355371},{"name":"./lik.plugins","loc":{"line":3,"column":24},"parent":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/@pushrocks/lik/dist/lik.stringmap.js","resolved":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/@pushrocks/lik/dist/lik.plugins.js"}],"generated":{"js":"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst plugins = require(\"./lik.plugins\");\nclass Stringmap {\n constructor() {\n this._stringArray = [];\n this._triggerUntilTrueFunctionArray = [];\n }\n /**\n * add a string to the Stringmap\n */\n addString(stringArg) {\n this._stringArray.push(stringArg);\n this.notifyTrigger();\n }\n /**\n * like addString, but accepts an array of strings\n */\n addStringArray(stringArrayArg) {\n for (let stringItem of stringArrayArg) {\n this.addString(stringItem);\n }\n }\n /**\n * removes a string from Stringmap\n */\n removeString(stringArg) {\n for (let keyArg in this._stringArray) {\n if (this._stringArray[keyArg] === stringArg) {\n this._stringArray.splice(parseInt(keyArg), 1);\n }\n }\n this.notifyTrigger();\n }\n /**\n * wipes the Stringmap\n */\n wipe() {\n this._stringArray = [];\n this.notifyTrigger();\n }\n /**\n * check if string is in Stringmap\n */\n checkString(stringArg) {\n return this._stringArray.indexOf(stringArg) !== -1;\n }\n /**\n * checks stringPresence with minimatch\n */\n checkMinimatch(miniMatchStringArg) {\n let foundMatch = false;\n for (let stringItem of this._stringArray) {\n if (plugins.minimatch(stringItem, miniMatchStringArg)) {\n foundMatch = true;\n }\n }\n return foundMatch;\n }\n /**\n * checks if the Stringmap is empty\n */\n checkIsEmpty() {\n return this._stringArray.length === 0;\n }\n /**\n * gets a cloned copy of the current string Array\n */\n getStringArray() {\n const returnArray = [];\n for (const stringItem of this._stringArray) {\n returnArray.push(stringItem);\n }\n return returnArray;\n }\n // trigger registering\n /**\n * register a new trigger\n */\n registerUntilTrue(functionArg, doFunctionArg) {\n this._triggerUntilTrueFunctionArray.push(() => {\n let result = functionArg();\n if (result === true) {\n doFunctionArg();\n }\n return result;\n });\n this.notifyTrigger();\n }\n /**\n * notifies triggers\n */\n notifyTrigger() {\n let filteredArray = this._triggerUntilTrueFunctionArray.filter(functionArg => {\n return !functionArg();\n });\n this._triggerUntilTrueFunctionArray = filteredArray;\n }\n}\nexports.Stringmap = Stringmap;\n","map":{"version":3,"file":"lik.stringmap.js","sourceRoot":"","sources":["../ts/lik.stringmap.ts"],"names":[],"mappings":";;AAAA,yCAAyC;AAUzC,MAAa,SAAS;IAGpB;QAFQ,iBAAY,GAAa,EAAE,CAAC;QAC5B,mCAA8B,GAAuB,EAAE,CAAC;IACjD,CAAC;IAChB;;OAEG;IACH,SAAS,CAAC,SAAiB;QACzB,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAClC,IAAI,CAAC,aAAa,EAAE,CAAC;IACvB,CAAC;IAED;;OAEG;IACH,cAAc,CAAC,cAAwB;QACrC,KAAK,IAAI,UAAU,IAAI,cAAc,EAAE;YACrC,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;SAC5B;IACH,CAAC;IAED;;OAEG;IACH,YAAY,CAAC,SAAiB;QAC5B,KAAK,IAAI,MAAM,IAAI,IAAI,CAAC,YAAY,EAAE;YACpC,IAAI,IAAI,