@vpmedia/simplify 1.36.0 → 1.38.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/src/logging/Logger.js
CHANGED
|
@@ -27,7 +27,7 @@ export class Logger {
|
|
|
27
27
|
const isProduction = appEnvironment === 'production' || appEnvironment === 'release';
|
|
28
28
|
const defaultLevel = isProduction ? LOG_LEVEL_SILENT : LOG_LEVEL_DEBUG;
|
|
29
29
|
const parameterName = `log_${this.name.toLowerCase()}`;
|
|
30
|
-
this.level = Number.parseInt(getURLParam(parameterName, getURLParam('log_all', defaultLevel)), 10);
|
|
30
|
+
this.level = Number.parseInt(getURLParam(parameterName, getURLParam('log_all', defaultLevel.toString())), 10);
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
/**
|
package/src/util/getURLParam.js
CHANGED
|
@@ -5,14 +5,14 @@ const urlSearchParams = new URLSearchParams(window.location.search);
|
|
|
5
5
|
/**
|
|
6
6
|
* TBD.
|
|
7
7
|
* @param {string} key - TBD.
|
|
8
|
-
* @param {string
|
|
8
|
+
* @param {string} defaultValue - TBD.
|
|
9
9
|
* @param {boolean} isSanitize - TBD.
|
|
10
10
|
* @returns {string} TBD.
|
|
11
11
|
*/
|
|
12
12
|
export const getURLParam = (key, defaultValue = null, isSanitize = true) => {
|
|
13
13
|
const paramValue = urlSearchParams.get(key);
|
|
14
14
|
if (paramValue === null || paramValue === undefined) {
|
|
15
|
-
return
|
|
15
|
+
return defaultValue;
|
|
16
16
|
}
|
|
17
17
|
if (isSanitize) {
|
|
18
18
|
return sanitizeURLParam(paramValue);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Logger.d.ts","sourceRoot":"","sources":["../../src/logging/Logger.js"],"names":[],"mappings":"AAaA;IACE;;OAEG;IACH,iBAFU,OAAO,yBAAyB,EAAE,kBAAkB,EAAE,CAE3C;IAerB;;;OAGG;IACH,oBAAqB,SAFV,OAAO,yBAAyB,EAAE,kBAEjB,UAE1B;IAEF;;;;;;;OAOG;IACH,cAAe,QANJ,MAMU,EAAE,OALZ,MAKiB,EAAE,SAJnB,MAI0B,EAAE,OAH5B,MAGiC,EAAE,QAFnC,KAEwC,UAOjD;IApCF;;;OAGG;IACH,mBAFW,MAAM,EAShB;IANC,aAAoC;IAKpC,
|
|
1
|
+
{"version":3,"file":"Logger.d.ts","sourceRoot":"","sources":["../../src/logging/Logger.js"],"names":[],"mappings":"AAaA;IACE;;OAEG;IACH,iBAFU,OAAO,yBAAyB,EAAE,kBAAkB,EAAE,CAE3C;IAerB;;;OAGG;IACH,oBAAqB,SAFV,OAAO,yBAAyB,EAAE,kBAEjB,UAE1B;IAEF;;;;;;;OAOG;IACH,cAAe,QANJ,MAMU,EAAE,OALZ,MAKiB,EAAE,SAJnB,MAI0B,EAAE,OAH5B,MAGiC,EAAE,QAFnC,KAEwC,UAOjD;IApCF;;;OAGG;IACH,mBAFW,MAAM,EAShB;IANC,aAAoC;IAKpC,cAA6G;IA4B/G;;;;OAIG;IACH,eAHW,MAAM,UACN,MAAM,QAIhB;IAED;;;;OAIG;IACH,cAHW,MAAM,UACN,MAAM,QAIhB;IAED;;;;OAIG;IACH,cAHW,MAAM,UACN,MAAM,QAIhB;IAED;;;;OAIG;IACH,iBAHW,MAAM,UACN,MAAM,QAIhB;IAED;;;;OAIG;IACH,eAHW,MAAM,UACN,MAAM,QAIhB;IAED;;;;;OAKG;IACH,mBAJW,MAAM,SACN,KAAK,UACL,MAAM,QAIhB;CACF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export function getURLParam(key: string, defaultValue?: string
|
|
1
|
+
export function getURLParam(key: string, defaultValue?: string, isSanitize?: boolean): string;
|
|
2
2
|
//# sourceMappingURL=getURLParam.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getURLParam.d.ts","sourceRoot":"","sources":["../../src/util/getURLParam.js"],"names":[],"mappings":"AAWO,iCALI,MAAM,iBACN,MAAM,
|
|
1
|
+
{"version":3,"file":"getURLParam.d.ts","sourceRoot":"","sources":["../../src/util/getURLParam.js"],"names":[],"mappings":"AAWO,iCALI,MAAM,iBACN,MAAM,eACN,OAAO,GACL,MAAM,CAWlB"}
|