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

1 line
4.9 KiB
JSON

{"id":"../node_modules/@pushrocks/smarttime/dist/smarttime.units.js","dependencies":[{"name":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/@pushrocks/smarttime/ts/smarttime.units.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/smarttime/package.json","includedInParent":true,"mtime":1545395356342}],"generated":{"js":"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.units = {\n years: (timesArg = 1) => {\n return timesArg * 3.154e10;\n },\n months: (timesArg = 1) => {\n return timesArg * 2.628e9;\n },\n weeks: (timesArg = 1) => {\n return timesArg * 6.048e8;\n },\n days: (timesArg = 1) => {\n return timesArg * 8.64e7;\n },\n hours: (timesArg = 1) => {\n return timesArg * 3.6e6;\n },\n minutes: (timesArg = 1) => {\n return timesArg * 60000;\n }\n};\nexports.getMilliSecondsFromUnits = (combinationArg) => {\n let timeInMilliseconds = 0;\n let addMilliSeconds = milliSecondsArg => {\n timeInMilliseconds = timeInMilliseconds + milliSecondsArg;\n };\n if (combinationArg.years) {\n addMilliSeconds(exports.units.years(combinationArg.years));\n }\n if (combinationArg.months) {\n addMilliSeconds(exports.units.months(combinationArg.months));\n }\n if (combinationArg.weeks) {\n addMilliSeconds(exports.units.weeks(combinationArg.weeks));\n }\n if (combinationArg.days) {\n addMilliSeconds(exports.units.days(combinationArg.days));\n }\n if (combinationArg.hours) {\n addMilliSeconds(exports.units.hours(combinationArg.hours));\n }\n if (combinationArg.minutes) {\n addMilliSeconds(exports.units.minutes(combinationArg.minutes));\n }\n return timeInMilliseconds;\n};\n","map":{"version":3,"file":"smarttime.units.js","sourceRoot":"","sources":["../ts/smarttime.units.ts"],"names":[],"mappings":";;A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AI,cAAc,CAAC,IAAI,EAAE;QACvB,eAAe,CAAC,aAAK,CAAC,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC;KAClD;IACD,IAAI,cAAc,CAAC,KAAK,EAAE;QACxB,eAAe,CAAC,aAAK,CAAC,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,CAAC;KACpD;IACD,IAAI,cAAc,CAAC,OAAO,EAAE;QAC1B,eAAe,CAAC,aAAK,CAAC,OAAO,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;KACxD;IAED,OAAO,kBAAkB,CAAC;AAC5B,CAAC,CAAC","sourcesContent":["export let units = {\n years: (timesArg = 1): number => {\n return timesArg * 3.154e10;\n },\n months: (timesArg = 1): number => {\n return timesArg * 2.628e9;\n },\n weeks: (timesArg = 1) => {\n return timesArg * 6.048e8;\n },\n days: (timesArg = 1) => {\n return timesArg * 8.64e7;\n },\n hours: (timesArg = 1) => {\n return timesArg * 3.6e6;\n },\n minutes: (timesArg = 1) => {\n return timesArg * 60000;\n }\n};\n\nexport interface IUnitCombinationArg {\n years?: number;\n months?: number;\n weeks?: number;\n days?: number;\n hours?: number;\n minutes?: number;\n}\n\nexport let getMilliSecondsFromUnits = (combinationArg: IUnitCombinationArg) => {\n let timeInMilliseconds = 0;\n let addMilliSeconds = milliSecondsArg => {\n timeInMilliseconds = timeInMilliseconds + milliSecondsArg;\n };\n if (combinationArg.years) {\n addMilliSeconds(units.years(combinationArg.years));\n }\n if (combinationArg.months) {\n addMilliSeconds(units.months(combinationArg.months));\n }\n if (combinationArg.weeks) {\n addMilliSeconds(units.weeks(combinationArg.weeks));\n }\n if (combinationArg.days) {\n addMilliSeconds(units.days(combinationArg.days));\n }\n if (combinationArg.hours) {\n addMilliSeconds(units.hours(combinationArg.hours));\n }\n if (combinationArg.minutes) {\n addMilliSeconds(units.minutes(combinationArg.minutes));\n }\n\n return timeInMilliseconds;\n};\n"]}},"hash":"639a0795d0d38a22580775a76e14db46","cacheData":{"env":{}}}