webdetector/.cache/c9/f82e65702c41aecd6abedd178da7e8.json
2018-12-21 13:36:28 +01:00

1 line
19 KiB
JSON

{"id":"JyIG","dependencies":[{"name":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/@pushrocks/lik/ts/lik.objectmap.ts","includedInParent":true,"mtime":499162500000},{"name":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/package.json","includedInParent":true,"mtime":1545395749058},{"name":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/@pushrocks/lik/package.json","includedInParent":true,"mtime":1545395355371}],"generated":{"js":"\"use strict\";var t=this&&this.__awaiter||function(t,e,r,o){return new(r||(r=Promise))(function(n,i){function c(t){try{h(o.next(t))}catch(e){i(e)}}function s(t){try{h(o.throw(t))}catch(e){i(e)}}function h(t){t.done?n(t.value):new r(function(e){e(t.value)}).then(c,s)}h((o=o.apply(t,e||[])).next())})};Object.defineProperty(exports,\"__esModule\",{value:!0});class e{constructor(){this.objectArray=[]}add(t){return!this.checkForObject(t)&&(this.objectArray.push(t),!0)}addArray(t){for(let e of t)this.add(e)}checkForObject(t){return-1!==this.objectArray.indexOf(t)}find(t){const e=this.objectArray.filter(t);return e.length>0?e[0]:null}findOneAndRemove(t){const e=this.find(t);return e&&this.remove(e),e}forEach(e){return t(this,void 0,void 0,function*(){for(let t of this.objectArray)yield e(t)})}getOneAndRemove(){return this.objectArray.shift()}getArray(){const t=[];for(const e of this.objectArray)t.push(e);return t}isEmpty(){return 0===this.objectArray.length}remove(t){let e=[];for(let r of this.objectArray)r!==t&&e.push(r);this.objectArray=e}wipe(){this.objectArray=[]}}exports.Objectmap=e;","map":{"mappings":[{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":14,"column":0},"generated":{"line":1,"column":355}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":14,"column":13},"generated":{"line":1,"column":361}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":20,"column":2},"generated":{"line":1,"column":363}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":15,"column":10},"generated":{"line":1,"column":377}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":15,"column":10},"generated":{"line":1,"column":382}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":15,"column":29},"generated":{"line":1,"column":394}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":29,"column":9},"generated":{"line":1,"column":397}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":29,"column":13},"generated":{"line":1,"column":401}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":30,"column":4},"generated":{"line":1,"column":404}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":30,"column":8},"generated":{"line":1,"column":411}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":30,"column":13},"generated":{"line":1,"column":416}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":30,"column":28},"generated":{"line":1,"column":431}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":35,"column":6},"generated":{"line":1,"column":436}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":35,"column":11},"generated":{"line":1,"column":441}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":35,"column":23},"generated":{"line":1,"column":453}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":35,"column":28},"generated":{"line":1,"column":458}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":36,"column":13},"generated":{"line":1,"column":462}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":43,"column":9},"generated":{"line":1,"column":465}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":43,"column":18},"generated":{"line":1,"column":474}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":44,"column":4},"generated":{"line":1,"column":477}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":44,"column":9},"generated":{"line":1,"column":481}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":44,"column":13},"generated":{"line":1,"column":485}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":44,"column":21},"generated":{"line":1,"column":490}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":45,"column":6},"generated":{"line":1,"column":492}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":45,"column":11},"generated":{"line":1,"column":497}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":45,"column":15},"generated":{"line":1,"column":501}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":52,"column":9},"generated":{"line":1,"column":504}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":52,"column":24},"generated":{"line":1,"column":519}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":53,"column":4},"generated":{"line":1,"column":522}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":53,"column":52},"generated":{"line":1,"column":529}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":53,"column":11},"generated":{"line":1,"column":533}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":53,"column":16},"generated":{"line":1,"column":538}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":53,"column":28},"generated":{"line":1,"column":550}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":53,"column":36},"generated":{"line":1,"column":558}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":59,"column":9},"generated":{"line":1,"column":561}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":59,"column":14},"generated":{"line":1,"column":566}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":60,"column":4},"generated":{"line":1,"column":569}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":60,"column":10},"generated":{"line":1,"column":575}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":60,"column":24},"generated":{"line":1,"column":577}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":60,"column":29},"generated":{"line":1,"column":582}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":60,"column":41},"generated":{"line":1,"column":594}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":60,"column":48},"generated":{"line":1,"column":601}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":61,"column":4},"generated":{"line":1,"column":604}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":61,"column":8},"generated":{"line":1,"column":611}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":61,"column":20},"generated":{"line":1,"column":613}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":61,"column":29},"generated":{"line":1,"column":620}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":62,"column":13},"generated":{"line":1,"column":622}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":62,"column":25},"generated":{"line":1,"column":624}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":64,"column":13},"generated":{"line":1,"column":627}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":71,"column":9},"generated":{"line":1,"column":632}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":71,"column":26},"generated":{"line":1,"column":649}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":72,"column":4},"generated":{"line":1,"column":652}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":72,"column":10},"generated":{"line":1,"column":658}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":72,"column":25},"generated":{"line":1,"column":660}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":72,"column":30},"generated":{"line":1,"column":665}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":72,"column":35},"generated":{"line":1,"column":670}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":76,"column":4},"generated":{"line":1,"column":673}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":73,"column":8},"generated":{"line":1,"column":680}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":74,"column":6},"generated":{"line":1,"column":683}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":74,"column":11},"generated":{"line":1,"column":688}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":74,"column":18},"generated":{"line":1,"column":695}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":76,"column":11},"generated":{"line":1,"column":698}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":82,"column":15},"generated":{"line":1,"column":700}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":82,"column":23},"generated":{"line":1,"column":708}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":83,"column":4},"generated":{"line":1,"column":751}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":83,"column":9},"generated":{"line":1,"column":755}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":83,"column":13},"generated":{"line":1,"column":759}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":83,"column":23},"generated":{"line":1,"column":764}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":83,"column":28},"generated":{"line":1,"column":769}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":84,"column":12},"generated":{"line":1,"column":787}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":84,"column":24},"generated":{"line":1,"column":789}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":91,"column":9},"generated":{"line":1,"column":794}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":92,"column":4},"generated":{"line":1,"column":812}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":92,"column":11},"generated":{"line":1,"column":819}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":92,"column":16},"generated":{"line":1,"column":824}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":92,"column":28},"generated":{"line":1,"column":836}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":98,"column":9},"generated":{"line":1,"column":844}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":99,"column":4},"generated":{"line":1,"column":855}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":99,"column":10},"generated":{"line":1,"column":861}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":99,"column":31},"generated":{"line":1,"column":863}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":100,"column":4},"generated":{"line":1,"column":866}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":100,"column":9},"generated":{"line":1,"column":870}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":100,"column":15},"generated":{"line":1,"column":876}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":100,"column":29},"generated":{"line":1,"column":881}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":100,"column":34},"generated":{"line":1,"column":886}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":101,"column":6},"generated":{"line":1,"column":898}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":101,"column":18},"generated":{"line":1,"column":900}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":101,"column":23},"generated":{"line":1,"column":905}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":103,"column":4},"generated":{"line":1,"column":908}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":103,"column":11},"generated":{"line":1,"column":915}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":109,"column":9},"generated":{"line":1,"column":917}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":110,"column":4},"generated":{"line":1,"column":927}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":110,"column":36},"generated":{"line":1,"column":934}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":110,"column":8},"generated":{"line":1,"column":938}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":110,"column":13},"generated":{"line":1,"column":943}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":110,"column":25},"generated":{"line":1,"column":955}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":120,"column":9},"generated":{"line":1,"column":962}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":120,"column":16},"generated":{"line":1,"column":969}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":121,"column":4},"generated":{"line":1,"column":972}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":121,"column":8},"generated":{"line":1,"column":976}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":121,"column":27},"generated":{"line":1,"column":978}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":122,"column":4},"generated":{"line":1,"column":981}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":122,"column":9},"generated":{"line":1,"column":985}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":122,"column":13},"generated":{"line":1,"column":989}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":122,"column":21},"generated":{"line":1,"column":994}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":122,"column":26},"generated":{"line":1,"column":999}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":123,"column":10},"generated":{"line":1,"column":1011}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":123,"column":19},"generated":{"line":1,"column":1015}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":124,"column":8},"generated":{"line":1,"column":1018}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":124,"column":25},"generated":{"line":1,"column":1020}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":124,"column":30},"generated":{"line":1,"column":1025}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":127,"column":4},"generated":{"line":1,"column":1028}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":127,"column":9},"generated":{"line":1,"column":1033}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":127,"column":23},"generated":{"line":1,"column":1045}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":133,"column":9},"generated":{"line":1,"column":1047}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":134,"column":4},"generated":{"line":1,"column":1054}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":134,"column":9},"generated":{"line":1,"column":1059}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":134,"column":23},"generated":{"line":1,"column":1071}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":14,"column":0},"generated":{"line":1,"column":1075}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":14,"column":0},"generated":{"line":1,"column":1083}},{"source":"../ts/lik.objectmap.ts","name":null,"original":{"line":14,"column":0},"generated":{"line":1,"column":1093}}],"sources":{"../ts/lik.objectmap.ts":"import * as plugins from './lik.plugins';\n\nexport interface IObjectmapForEachFunction<T> {\n (itemArg: T): void;\n}\n\nexport interface IObjectmapFindFunction<T> {\n (itemArg: T): boolean;\n}\n\n/**\n * allows keeping track of objects\n */\nexport class Objectmap<T> {\n private objectArray: T[] = [];\n\n /**\n * returns a new instance\n */\n constructor() {\n // nothing here\n }\n\n /**\n * add object to Objectmap\n * returns false if the object is already in the map\n * returns true if the object was added successfully\n */\n public add(objectArg: T): boolean {\n if (this.checkForObject(objectArg)) {\n // the object is already in the objectmap\n return false;\n } else {\n // the object is not yet in the objectmap\n this.objectArray.push(objectArg);\n return true;\n }\n }\n\n /**\n * like .add but adds an whole array of objects\n */\n public addArray(objectArrayArg: T[]) {\n for (let item of objectArrayArg) {\n this.add(item);\n }\n }\n\n /**\n * check if object is in Objectmap\n */\n public checkForObject(objectArg: T) {\n return this.objectArray.indexOf(objectArg) !== -1;\n }\n\n /**\n * find object\n */\n public find(findFunction: IObjectmapFindFunction<T>) {\n const resultArray = this.objectArray.filter(findFunction);\n if (resultArray.length > 0) {\n return resultArray[0];\n } else {\n return null;\n }\n }\n\n /**\n * finds a specific element and then removes it\n */\n public findOneAndRemove(findFunction: IObjectmapFindFunction<T>): T {\n const foundElement = this.find(findFunction);\n if (foundElement) {\n this.remove(foundElement);\n }\n return foundElement;\n }\n\n /**\n * run function for each item in Objectmap\n */\n public async forEach(functionArg: IObjectmapForEachFunction<T>) {\n for (let object of this.objectArray) {\n await functionArg(object);\n }\n }\n\n /**\n * gets an object in the Observablemap and removes it, so it can't be retrieved again\n */\n public getOneAndRemove(): T {\n return this.objectArray.shift();\n }\n\n /**\n * returns a cloned array of all the objects currently in the Objectmap\n */\n public getArray() {\n const returnArray: any[] = [];\n for (const objectItem of this.objectArray) {\n returnArray.push(objectItem);\n }\n return returnArray;\n }\n\n /**\n * check if Objectmap ist empty\n */\n public isEmpty(): boolean {\n if (this.objectArray.length === 0) {\n return true;\n } else {\n return false;\n }\n }\n\n /**\n * remove object from Objectmap\n */\n public remove(objectArg: T) {\n let replacementArray = [];\n for (let item of this.objectArray) {\n if (item !== objectArg) {\n replacementArray.push(item);\n }\n }\n this.objectArray = replacementArray;\n }\n\n /**\n * wipe Objectmap\n */\n public wipe() {\n this.objectArray = [];\n }\n}\n"},"lineCount":null}},"hash":"3565dcac354643504c3f097ef57c0d4a","cacheData":{"env":{}}}