@vpmedia/simplify 1.6.1 → 1.7.1

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.
Files changed (50) hide show
  1. package/README.md +1 -1
  2. package/eslint.config.js +2 -0
  3. package/package.json +3 -3
  4. package/src/index.js +4 -1
  5. package/src/logging/getAppEnvironment.js +2 -2
  6. package/src/util/addLeadingZero.js +2 -2
  7. package/src/util/capitalize.js +2 -2
  8. package/src/util/deg2rad.js +8 -0
  9. package/src/util/deg2rad.test.js +5 -0
  10. package/src/util/fetchRetry.js +9 -4
  11. package/src/util/getObjArrayPropSum.js +2 -2
  12. package/src/util/getObjValueByPath.js +2 -2
  13. package/src/util/getRandomInt.js +2 -2
  14. package/src/util/getURLParam.js +2 -2
  15. package/src/util/purgeObject.js +13 -0
  16. package/src/util/sanitizeURLParam.js +2 -2
  17. package/src/util/saveAsFile.js +14 -0
  18. package/src/util/setObjValueByPath.js +2 -2
  19. package/src/util/underscoreToCamelCase.js +2 -2
  20. package/types/index.d.ts +4 -1
  21. package/types/logging/getAppEnvironment.d.ts +0 -4
  22. package/types/logging/getAppEnvironment.d.ts.map +1 -1
  23. package/types/util/addLeadingZero.d.ts +0 -6
  24. package/types/util/addLeadingZero.d.ts.map +1 -1
  25. package/types/util/capitalize.d.ts +0 -5
  26. package/types/util/capitalize.d.ts.map +1 -1
  27. package/types/util/deg2rad.d.ts +2 -0
  28. package/types/util/deg2rad.d.ts.map +1 -0
  29. package/types/util/deg2rot.d.ts +2 -0
  30. package/types/util/deg2rot.d.ts.map +1 -0
  31. package/types/util/fetchRetry.d.ts +4 -1
  32. package/types/util/fetchRetry.d.ts.map +1 -1
  33. package/types/util/getObjArrayPropSum.d.ts +0 -6
  34. package/types/util/getObjArrayPropSum.d.ts.map +1 -1
  35. package/types/util/getObjValueByPath.d.ts +0 -6
  36. package/types/util/getObjValueByPath.d.ts.map +1 -1
  37. package/types/util/getRandomInt.d.ts +0 -6
  38. package/types/util/getRandomInt.d.ts.map +1 -1
  39. package/types/util/getURLParam.d.ts +0 -7
  40. package/types/util/getURLParam.d.ts.map +1 -1
  41. package/types/util/purgeObject.d.ts +2 -0
  42. package/types/util/purgeObject.d.ts.map +1 -0
  43. package/types/util/sanitizeURLParam.d.ts +0 -5
  44. package/types/util/sanitizeURLParam.d.ts.map +1 -1
  45. package/types/util/saveAsFile.d.ts +2 -0
  46. package/types/util/saveAsFile.d.ts.map +1 -0
  47. package/types/util/setObjValueByPath.d.ts +0 -7
  48. package/types/util/setObjValueByPath.d.ts.map +1 -1
  49. package/types/util/underscoreToCamelCase.d.ts +0 -5
  50. package/types/util/underscoreToCamelCase.d.ts.map +1 -1
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @vpmedia/simplify
2
2
 
3
- [![npm version](https://badge.fury.io/js/@vpmedia%2Fsimplify.svg?v=1.6.1)](https://badge.fury.io/js/@vpmedia%2Fsimplify)
3
+ [![npm version](https://badge.fury.io/js/@vpmedia%2Fsimplify.svg?v=1.7.1)](https://badge.fury.io/js/@vpmedia%2Fsimplify)
4
4
  [![Node.js CI](https://github.com/vpmedia/simplify/actions/workflows/ci.yml/badge.svg)](https://github.com/vpmedia/simplify/actions/workflows/ci.yml)
5
5
 
6
6
  @vpmedia/simplify TBD
package/eslint.config.js CHANGED
@@ -57,6 +57,8 @@ export default [
57
57
  'unicorn/filename-case': 'off',
58
58
  'unicorn/no-null': 'off',
59
59
  'unicorn/prevent-abbreviations': 'off',
60
+ 'unicorn/prefer-global-this': 'off',
61
+ 'unicorn/numeric-separators-style': 'off',
60
62
  'no-unused-vars': 'off',
61
63
  'prefer-arrow-callback': 'error',
62
64
  'prefer-template': 'error',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vpmedia/simplify",
3
- "version": "1.6.1",
3
+ "version": "1.7.1",
4
4
  "description": "@vpmedia/simplify",
5
5
  "author": "Andras Csizmadia <andras@vpmedia.hu> (www.vpmedia.hu)",
6
6
  "license": "MIT",
@@ -23,9 +23,9 @@
23
23
  "@eslint/js": "^9.10.0",
24
24
  "@jest/globals": "^29.7.0",
25
25
  "@types/jest": "^29.5.13",
26
- "eslint": "^9.11.1",
26
+ "eslint": "^9.12.0",
27
27
  "eslint-plugin-jsdoc": "^50.3.1",
28
- "eslint-plugin-unicorn": "^55.0.0",
28
+ "eslint-plugin-unicorn": "^56.0.0",
29
29
  "globals": "^15.10.0",
30
30
  "jest": "^29.7.0",
31
31
  "jest-environment-jsdom": "^29.7.0",
package/src/index.js CHANGED
@@ -3,11 +3,14 @@ export * from './const/http_status.js';
3
3
  export { Logger } from './logging/Logger.js';
4
4
  export { addLeadingZero } from './util/addLeadingZero.js';
5
5
  export { capitalize } from './util/capitalize.js';
6
+ export { deg2rad } from './util/deg2rad.js';
6
7
  export { delayPromise } from './util/delayPromise.js';
7
- export { FetchError, fetchRetry } from './util/fetchRetry.js';
8
+ export { FetchError, HTTP_0_ANY, fetchRetry } from './util/fetchRetry.js';
8
9
  export { getObjValueByPath } from './util/getObjValueByPath.js';
9
10
  export { getRandomInt } from './util/getRandomInt.js';
10
11
  export { getURLParam } from './util/getURLParam.js';
12
+ export { purgeObject } from './util/purgeObject.js';
11
13
  export { sanitizeURLParam } from './util/sanitizeURLParam.js';
14
+ export { saveAsFile } from './util/saveAsFile.js';
12
15
  export { setObjValueByPath } from './util/setObjValueByPath.js';
13
16
  export { underscoreToCamelCase } from './util/underscoreToCamelCase.js';
@@ -2,7 +2,7 @@
2
2
  * Returns the application environment identifier.
3
3
  * @returns {string} TBD.
4
4
  */
5
- export function getAppEnvironment() {
5
+ export const getAppEnvironment = () => {
6
6
  let appEnvironment = 'local';
7
7
  try {
8
8
  if (import.meta['env'].VITE_APP_ENVIRONMENT) {
@@ -19,4 +19,4 @@ export function getAppEnvironment() {
19
19
  // pass
20
20
  }
21
21
  return appEnvironment;
22
- }
22
+ };
@@ -4,7 +4,7 @@
4
4
  * @param {number} size - TBD.
5
5
  * @returns {string} TBD.
6
6
  */
7
- export function addLeadingZero(value, size = 2) {
7
+ export const addLeadingZero = (value, size = 2) => {
8
8
  if (value === null || value === undefined) {
9
9
  // @ts-ignore: Type 'string | number' is not assignable to type 'string'.
10
10
  return value;
@@ -14,4 +14,4 @@ export function addLeadingZero(value, size = 2) {
14
14
  value = `0${value}`;
15
15
  }
16
16
  return value;
17
- }
17
+ };
@@ -3,10 +3,10 @@
3
3
  * @param {string} value - Ther input string.
4
4
  * @returns {string} TBD.
5
5
  */
6
- export function capitalize(value) {
6
+ export const capitalize = (value) => {
7
7
  if (!value || value?.length === 0) {
8
8
  return value;
9
9
  }
10
10
  const normValue = value.toLowerCase();
11
11
  return normValue.charAt(0).toUpperCase() + normValue.slice(1);
12
- }
12
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Converts degrees to radians.
3
+ * @param {number} deg - Degree value.
4
+ * @returns {number} Radian value.
5
+ */
6
+ export const deg2rad = (deg) => {
7
+ return deg * (Math.PI / 180);
8
+ };
@@ -0,0 +1,5 @@
1
+ import { deg2rad } from './deg2rad.js';
2
+
3
+ test('TBD', () => {
4
+ expect(deg2rad(90)).toBe(1.5707963267948966);
5
+ });
@@ -4,16 +4,19 @@ import { delayPromise } from './delayPromise.js';
4
4
 
5
5
  const logger = new Logger('fetch');
6
6
 
7
+ export const HTTP_0_ANY = 0;
8
+
7
9
  export class FetchError extends Error {
8
10
  /**
9
11
  * Creates a new FetchError instance.
10
12
  * @param {string} message - Error message.
13
+ * @param {RequestInit} request - Fetch request object.
11
14
  * @param {Response} response - Fetch response object.
12
15
  */
13
- constructor(message, response) {
16
+ constructor(message, request, response) {
14
17
  super(message);
18
+ this.request = request;
15
19
  this.response = response;
16
- // Error.captureStackTrace(this, FetchError);
17
20
  }
18
21
  }
19
22
 
@@ -39,7 +42,7 @@ export const fetchRetry = async (resource, fetchOptions, retryOptions) => {
39
42
  const response = await fetch(resource, fetchOptions);
40
43
  if (!response.ok) {
41
44
  logger.warn('failure', response);
42
- throw new FetchError(`fetch ${response.url} returned status ${response.status}`, response);
45
+ throw new FetchError(`fetch ${response.url} returned status ${response.status}`, fetchOptions, response);
43
46
  }
44
47
  logger.info('success', response);
45
48
  return response;
@@ -49,7 +52,9 @@ export const fetchRetry = async (resource, fetchOptions, retryOptions) => {
49
52
  retryOptions.numTries -= 1;
50
53
  if (
51
54
  retryOptions.numTries === 0 ||
52
- (typedError instanceof FetchError && retryOptions.statusExcludes.includes(typedError.response.status))
55
+ (typedError instanceof FetchError &&
56
+ (retryOptions.statusExcludes.includes(typedError.response.status) ||
57
+ retryOptions.statusExcludes.includes(HTTP_0_ANY)))
53
58
  ) {
54
59
  throw error;
55
60
  }
@@ -4,8 +4,8 @@
4
4
  * @param {string} prop - The object property key.
5
5
  * @returns {number} The sum value.
6
6
  */
7
- export function getObjArrayPropSum(arr, prop) {
7
+ export const getObjArrayPropSum = (arr, prop) => {
8
8
  return arr.reduce((accumulator, object) => {
9
9
  return accumulator + object[prop];
10
10
  }, 0);
11
- }
11
+ };
@@ -4,7 +4,7 @@
4
4
  * @param {string} path - TBD.
5
5
  * @returns {*} TBD.
6
6
  */
7
- export function getObjValueByPath(obj, path) {
7
+ export const getObjValueByPath = (obj, path) => {
8
8
  if (!obj || !path) {
9
9
  return;
10
10
  }
@@ -14,4 +14,4 @@ export function getObjValueByPath(obj, path) {
14
14
  return obj[nextKey];
15
15
  }
16
16
  return getObjValueByPath(obj[nextKey], keyParts.slice(1).join('.'));
17
- }
17
+ };
@@ -4,6 +4,6 @@
4
4
  * @param {number} max - Max value.
5
5
  * @returns {number} Random integer in given range.
6
6
  */
7
- export function getRandomInt(min, max) {
7
+ export const getRandomInt = (min, max) => {
8
8
  return Math.floor(Math.random() * (max - min + 1)) + min;
9
- }
9
+ };
@@ -9,7 +9,7 @@ const urlSearchParams = new URLSearchParams(window.location.search);
9
9
  * @param {boolean} isSanitize - TBD.
10
10
  * @returns {string} TBD.
11
11
  */
12
- export function getURLParam(key, defaultValue = null, isSanitize = true) {
12
+ export const getURLParam = (key, defaultValue = null, isSanitize = true) => {
13
13
  const paramValue = urlSearchParams.get(key);
14
14
  if (paramValue === null || paramValue === undefined) {
15
15
  return defaultValue;
@@ -18,4 +18,4 @@ export function getURLParam(key, defaultValue = null, isSanitize = true) {
18
18
  return sanitizeURLParam(paramValue);
19
19
  }
20
20
  return paramValue;
21
- }
21
+ };
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Purges object properties to free up memory.
3
+ * @param {object} target - The target object.
4
+ */
5
+ export const purgeObject = (target) => {
6
+ if (!target) {
7
+ return;
8
+ }
9
+ const reference = target;
10
+ for (const entry of Object.keys(target)) {
11
+ reference[entry] = null;
12
+ }
13
+ };
@@ -3,9 +3,9 @@
3
3
  * @param {string} input - The input string to be sanitized.
4
4
  * @returns {string} The sanitized output string.
5
5
  */
6
- export function sanitizeURLParam(input) {
6
+ export const sanitizeURLParam = (input) => {
7
7
  if (!input) {
8
8
  return input;
9
9
  }
10
10
  return input.replaceAll(/[^\w-]/gi, '');
11
- }
11
+ };
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Saves text file.
3
+ * @param {string} filename - File name.
4
+ * @param {string} text - File content.
5
+ */
6
+ export const saveAsFile = (filename, text) => {
7
+ const element = document.createElement('a');
8
+ element.setAttribute('href', `data:text/plain;charset=utf-8,${encodeURIComponent(text)}`);
9
+ element.setAttribute('download', filename);
10
+ element.style.display = 'none';
11
+ document.body.append(element);
12
+ element.click();
13
+ element.remove();
14
+ };
@@ -5,7 +5,7 @@
5
5
  * @param {*} value - TBD.
6
6
  * @throws {SyntaxError} Error when illegal path value has been provided.
7
7
  */
8
- export function setObjValueByPath(obj, path, value) {
8
+ export const setObjValueByPath = (obj, path, value) => {
9
9
  if (!obj || !path) {
10
10
  return;
11
11
  }
@@ -18,4 +18,4 @@ export function setObjValueByPath(obj, path, value) {
18
18
  obj[nextKey] = value;
19
19
  }
20
20
  setObjValueByPath(obj[nextKey], keyParts.slice(1).join('.'), value);
21
- }
21
+ };
@@ -3,8 +3,8 @@
3
3
  * @param {string} value - The input string in underscore case.
4
4
  * @returns {string} The output string in camel case.
5
5
  */
6
- export function underscoreToCamelCase(value) {
6
+ export const underscoreToCamelCase = (value) => {
7
7
  return value.replaceAll(/(_\w)/g, (m) => {
8
8
  return m[1].toUpperCase();
9
9
  });
10
- }
10
+ };
package/types/index.d.ts CHANGED
@@ -2,12 +2,15 @@ export * from "./const/http_status.js";
2
2
  export { Logger } from "./logging/Logger.js";
3
3
  export { addLeadingZero } from "./util/addLeadingZero.js";
4
4
  export { capitalize } from "./util/capitalize.js";
5
+ export { deg2rad } from "./util/deg2rad.js";
5
6
  export { delayPromise } from "./util/delayPromise.js";
6
7
  export { getObjValueByPath } from "./util/getObjValueByPath.js";
7
8
  export { getRandomInt } from "./util/getRandomInt.js";
8
9
  export { getURLParam } from "./util/getURLParam.js";
10
+ export { purgeObject } from "./util/purgeObject.js";
9
11
  export { sanitizeURLParam } from "./util/sanitizeURLParam.js";
12
+ export { saveAsFile } from "./util/saveAsFile.js";
10
13
  export { setObjValueByPath } from "./util/setObjValueByPath.js";
11
14
  export { underscoreToCamelCase } from "./util/underscoreToCamelCase.js";
12
- export { FetchError, fetchRetry } from "./util/fetchRetry.js";
15
+ export { FetchError, HTTP_0_ANY, fetchRetry } from "./util/fetchRetry.js";
13
16
  //# sourceMappingURL=index.d.ts.map
@@ -1,6 +1,2 @@
1
- /**
2
- * Returns the application environment identifier.
3
- * @returns {string} TBD.
4
- */
5
1
  export function getAppEnvironment(): string;
6
2
  //# sourceMappingURL=getAppEnvironment.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getAppEnvironment.d.ts","sourceRoot":"","sources":["../../src/logging/getAppEnvironment.js"],"names":[],"mappings":"AAAA;;;GAGG;AACH,qCAFa,MAAM,CAmBlB"}
1
+ {"version":3,"file":"getAppEnvironment.d.ts","sourceRoot":"","sources":["../../src/logging/getAppEnvironment.js"],"names":[],"mappings":"AAIO,qCAFM,MAAM,CAmBlB"}
@@ -1,8 +1,2 @@
1
- /**
2
- * TBD.
3
- * @param {number|string} value - TBD.
4
- * @param {number} size - TBD.
5
- * @returns {string} TBD.
6
- */
7
1
  export function addLeadingZero(value: number | string, size?: number): string;
8
2
  //# sourceMappingURL=addLeadingZero.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"addLeadingZero.d.ts","sourceRoot":"","sources":["../../src/util/addLeadingZero.js"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,sCAJW,MAAM,GAAC,MAAM,SACb,MAAM,GACJ,MAAM,CAYlB"}
1
+ {"version":3,"file":"addLeadingZero.d.ts","sourceRoot":"","sources":["../../src/util/addLeadingZero.js"],"names":[],"mappings":"AAMO,sCAJI,MAAM,GAAC,MAAM,SACb,MAAM,GACJ,MAAM,CAYlB"}
@@ -1,7 +1,2 @@
1
- /**
2
- * Capitalize a string.
3
- * @param {string} value - Ther input string.
4
- * @returns {string} TBD.
5
- */
6
1
  export function capitalize(value: string): string;
7
2
  //# sourceMappingURL=capitalize.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"capitalize.d.ts","sourceRoot":"","sources":["../../src/util/capitalize.js"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,kCAHW,MAAM,GACJ,MAAM,CAQlB"}
1
+ {"version":3,"file":"capitalize.d.ts","sourceRoot":"","sources":["../../src/util/capitalize.js"],"names":[],"mappings":"AAKO,kCAHI,MAAM,GACJ,MAAM,CAQlB"}
@@ -0,0 +1,2 @@
1
+ export function deg2rad(deg: number): number;
2
+ //# sourceMappingURL=deg2rad.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deg2rad.d.ts","sourceRoot":"","sources":["../../src/util/deg2rad.js"],"names":[],"mappings":"AAKO,6BAHI,MAAM,GACJ,MAAM,CAIlB"}
@@ -0,0 +1,2 @@
1
+ export function deg2rad(deg: number): number;
2
+ //# sourceMappingURL=deg2rot.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deg2rot.d.ts","sourceRoot":"","sources":["../../src/util/deg2rot.js"],"names":[],"mappings":"AAKO,6BAHI,MAAM,GACJ,MAAM,CAIlB"}
@@ -1,10 +1,13 @@
1
+ export const HTTP_0_ANY: 0;
1
2
  export class FetchError extends Error {
2
3
  /**
3
4
  * Creates a new FetchError instance.
4
5
  * @param {string} message - Error message.
6
+ * @param {RequestInit} request - Fetch request object.
5
7
  * @param {Response} response - Fetch response object.
6
8
  */
7
- constructor(message: string, response: Response);
9
+ constructor(message: string, request: RequestInit, response: Response);
10
+ request: RequestInit;
8
11
  response: Response;
9
12
  }
10
13
  export function fetchRetry(resource: string | URL | Request, fetchOptions?: RequestInit, retryOptions?: {
@@ -1 +1 @@
1
- {"version":3,"file":"fetchRetry.d.ts","sourceRoot":"","sources":["../../src/util/fetchRetry.js"],"names":[],"mappings":"AAMA;IACE;;;;OAIG;IACH,qBAHW,MAAM,YACN,QAAQ,EAMlB;IAFC,mBAAwB;CAG3B;AASM,qCALI,MAAM,GAAG,GAAG,GAAG,OAAO,iBACtB,WAAW,iBACX;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,cAAc,CAAC,EAAE,MAAM,EAAE,CAAA;CAAC,GAC5D,OAAO,CAAC,QAAQ,CAAC,CAmC7B"}
1
+ {"version":3,"file":"fetchRetry.d.ts","sourceRoot":"","sources":["../../src/util/fetchRetry.js"],"names":[],"mappings":"AAMA,2BAA4B;AAE5B;IACE;;;;;OAKG;IACH,qBAJW,MAAM,WACN,WAAW,YACX,QAAQ,EAMlB;IAFC,qBAAsB;IACtB,mBAAwB;CAE3B;AASM,qCALI,MAAM,GAAG,GAAG,GAAG,OAAO,iBACtB,WAAW,iBACX;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,cAAc,CAAC,EAAE,MAAM,EAAE,CAAA;CAAC,GAC5D,OAAO,CAAC,QAAQ,CAAC,CAqC7B"}
@@ -1,8 +1,2 @@
1
- /**
2
- * Returns the sum value of an array of objects field.
3
- * @param {object[]} arr - The list of input objects.
4
- * @param {string} prop - The object property key.
5
- * @returns {number} The sum value.
6
- */
7
1
  export function getObjArrayPropSum(arr: object[], prop: string): number;
8
2
  //# sourceMappingURL=getObjArrayPropSum.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getObjArrayPropSum.d.ts","sourceRoot":"","sources":["../../src/util/getObjArrayPropSum.js"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,wCAJW,MAAM,EAAE,QACR,MAAM,GACJ,MAAM,CAMlB"}
1
+ {"version":3,"file":"getObjArrayPropSum.d.ts","sourceRoot":"","sources":["../../src/util/getObjArrayPropSum.js"],"names":[],"mappings":"AAMO,wCAJI,MAAM,EAAE,QACR,MAAM,GACJ,MAAM,CAMlB"}
@@ -1,8 +1,2 @@
1
- /**
2
- * Get object value by path.
3
- * @param {object} obj - TBD.
4
- * @param {string} path - TBD.
5
- * @returns {*} TBD.
6
- */
7
1
  export function getObjValueByPath(obj: object, path: string): any;
8
2
  //# sourceMappingURL=getObjValueByPath.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getObjValueByPath.d.ts","sourceRoot":"","sources":["../../src/util/getObjValueByPath.js"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,uCAJW,MAAM,QACN,MAAM,GACJ,GAAC,CAYb"}
1
+ {"version":3,"file":"getObjValueByPath.d.ts","sourceRoot":"","sources":["../../src/util/getObjValueByPath.js"],"names":[],"mappings":"AAMO,uCAJI,MAAM,QACN,MAAM,GACJ,GAAC,CAYb"}
@@ -1,8 +1,2 @@
1
- /**
2
- * Returns random integer in range.
3
- * @param {number} min - Min value.
4
- * @param {number} max - Max value.
5
- * @returns {number} Random integer in given range.
6
- */
7
1
  export function getRandomInt(min: number, max: number): number;
8
2
  //# sourceMappingURL=getRandomInt.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getRandomInt.d.ts","sourceRoot":"","sources":["../../src/util/getRandomInt.js"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,kCAJW,MAAM,OACN,MAAM,GACJ,MAAM,CAIlB"}
1
+ {"version":3,"file":"getRandomInt.d.ts","sourceRoot":"","sources":["../../src/util/getRandomInt.js"],"names":[],"mappings":"AAMO,kCAJI,MAAM,OACN,MAAM,GACJ,MAAM,CAIlB"}
@@ -1,9 +1,2 @@
1
- /**
2
- * TBD.
3
- * @param {string} key - TBD.
4
- * @param {*} defaultValue - TBD.
5
- * @param {boolean} isSanitize - TBD.
6
- * @returns {string} TBD.
7
- */
8
1
  export function getURLParam(key: string, defaultValue?: any, isSanitize?: boolean): string;
9
2
  //# sourceMappingURL=getURLParam.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getURLParam.d.ts","sourceRoot":"","sources":["../../src/util/getURLParam.js"],"names":[],"mappings":"AAIA;;;;;;GAMG;AACH,iCALW,MAAM,iBACN,GAAC,eACD,OAAO,GACL,MAAM,CAWlB"}
1
+ {"version":3,"file":"getURLParam.d.ts","sourceRoot":"","sources":["../../src/util/getURLParam.js"],"names":[],"mappings":"AAWO,iCALI,MAAM,iBACN,GAAC,eACD,OAAO,GACL,MAAM,CAWlB"}
@@ -0,0 +1,2 @@
1
+ export function purgeObject(target: object): void;
2
+ //# sourceMappingURL=purgeObject.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"purgeObject.d.ts","sourceRoot":"","sources":["../../src/util/purgeObject.js"],"names":[],"mappings":"AAIO,oCAFI,MAAM,QAUhB"}
@@ -1,7 +1,2 @@
1
- /**
2
- * Sanitizes URL parameters allowing only alpha-numeric characters and dash.
3
- * @param {string} input - The input string to be sanitized.
4
- * @returns {string} The sanitized output string.
5
- */
6
1
  export function sanitizeURLParam(input: string): string;
7
2
  //# sourceMappingURL=sanitizeURLParam.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sanitizeURLParam.d.ts","sourceRoot":"","sources":["../../src/util/sanitizeURLParam.js"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wCAHW,MAAM,GACJ,MAAM,CAOlB"}
1
+ {"version":3,"file":"sanitizeURLParam.d.ts","sourceRoot":"","sources":["../../src/util/sanitizeURLParam.js"],"names":[],"mappings":"AAKO,wCAHI,MAAM,GACJ,MAAM,CAOlB"}
@@ -0,0 +1,2 @@
1
+ export function saveAsFile(filename: string, text: string): void;
2
+ //# sourceMappingURL=saveAsFile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"saveAsFile.d.ts","sourceRoot":"","sources":["../../src/util/saveAsFile.js"],"names":[],"mappings":"AAKO,qCAHI,MAAM,QACN,MAAM,QAUhB"}
@@ -1,9 +1,2 @@
1
- /**
2
- * Get object value by path.
3
- * @param {object} obj - TBD.
4
- * @param {string} path - TBD.
5
- * @param {*} value - TBD.
6
- * @throws {SyntaxError} Error when illegal path value has been provided.
7
- */
8
1
  export function setObjValueByPath(obj: object, path: string, value: any): void;
9
2
  //# sourceMappingURL=setObjValueByPath.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"setObjValueByPath.d.ts","sourceRoot":"","sources":["../../src/util/setObjValueByPath.js"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,uCALW,MAAM,QACN,MAAM,SACN,GAAC,QAgBX"}
1
+ {"version":3,"file":"setObjValueByPath.d.ts","sourceRoot":"","sources":["../../src/util/setObjValueByPath.js"],"names":[],"mappings":"AAOO,uCALI,MAAM,QACN,MAAM,SACN,GAAC,QAgBX"}
@@ -1,7 +1,2 @@
1
- /**
2
- * Converts underscore case string to camel case.
3
- * @param {string} value - The input string in underscore case.
4
- * @returns {string} The output string in camel case.
5
- */
6
1
  export function underscoreToCamelCase(value: string): string;
7
2
  //# sourceMappingURL=underscoreToCamelCase.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"underscoreToCamelCase.d.ts","sourceRoot":"","sources":["../../src/util/underscoreToCamelCase.js"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,6CAHW,MAAM,GACJ,MAAM,CAMlB"}
1
+ {"version":3,"file":"underscoreToCamelCase.d.ts","sourceRoot":"","sources":["../../src/util/underscoreToCamelCase.js"],"names":[],"mappings":"AAKO,6CAHI,MAAM,GACJ,MAAM,CAMlB"}