@vpmedia/simplify 1.53.0 → 1.55.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.
Files changed (112) hide show
  1. package/CHANGELOG.md +52 -0
  2. package/package.json +16 -16
  3. package/src/index.js +9 -19
  4. package/src/logging/Logger.js +1 -1
  5. package/src/logging/OpenTelemetryLogHandler.js +1 -1
  6. package/src/logging/util.js +2 -0
  7. package/src/logging/util.test.js +4 -1
  8. package/src/pagelifecycle/util.js +17 -21
  9. package/src/util/async.js +20 -0
  10. package/src/util/{delayPromise.test.js → async.test.js} +1 -1
  11. package/src/util/{getErrorDetails.test.js → error.test.js} +1 -1
  12. package/src/util/{fetchRetry.js → fetch.js} +6 -4
  13. package/src/util/number.js +116 -0
  14. package/src/util/number.test.js +115 -0
  15. package/src/util/object.js +97 -0
  16. package/src/util/object.test.js +205 -0
  17. package/src/util/{getURLParam.js → query.js} +12 -2
  18. package/src/util/{sanitizeURLParam.test.js → query.test.js} +18 -1
  19. package/src/util/{serverDataToState.js → state.js} +1 -1
  20. package/src/util/{serverDataToState.test.js → state.test.js} +1 -1
  21. package/src/util/string.js +54 -0
  22. package/src/util/{capitalize.test.js → string.test.js} +19 -1
  23. package/src/util/validate.js +272 -0
  24. package/src/util/validate.test.js +325 -0
  25. package/tsconfig.build.json +24 -0
  26. package/types/index.d.ts +9 -19
  27. package/types/logging/util.d.ts.map +1 -1
  28. package/types/pagelifecycle/util.d.ts +1 -1
  29. package/types/pagelifecycle/util.d.ts.map +1 -1
  30. package/types/util/async.d.ts +3 -0
  31. package/types/util/async.d.ts.map +1 -0
  32. package/types/util/{getErrorDetails.d.ts → error.d.ts} +1 -1
  33. package/types/util/error.d.ts.map +1 -0
  34. package/types/util/{fetchRetry.d.ts → fetch.d.ts} +1 -1
  35. package/types/util/fetch.d.ts.map +1 -0
  36. package/types/util/number.d.ts +13 -0
  37. package/types/util/number.d.ts.map +1 -0
  38. package/types/util/object.d.ts +6 -0
  39. package/types/util/object.d.ts.map +1 -0
  40. package/types/util/{getURLParam.d.ts → query.d.ts} +2 -1
  41. package/types/util/query.d.ts.map +1 -0
  42. package/types/util/{serverDataToState.d.ts → state.d.ts} +1 -1
  43. package/types/util/state.d.ts.map +1 -0
  44. package/types/util/string.d.ts +5 -0
  45. package/types/util/string.d.ts.map +1 -0
  46. package/types/util/validate.d.ts +54 -0
  47. package/types/util/validate.d.ts.map +1 -0
  48. package/src/util/addLeadingZero.js +0 -16
  49. package/src/util/addLeadingZero.test.js +0 -11
  50. package/src/util/capitalize.js +0 -15
  51. package/src/util/deepMerge.js +0 -24
  52. package/src/util/deepMerge.test.js +0 -103
  53. package/src/util/deg2rad.js +0 -8
  54. package/src/util/deg2rad.test.js +0 -5
  55. package/src/util/delayPromise.js +0 -6
  56. package/src/util/fixFloatPrecision.js +0 -16
  57. package/src/util/fixFloatPrecision.test.js +0 -27
  58. package/src/util/getObjArrayPropSum.js +0 -11
  59. package/src/util/getObjValueByPath.js +0 -20
  60. package/src/util/getObjValueByPath.test.js +0 -51
  61. package/src/util/getRandomInt.js +0 -9
  62. package/src/util/getRandomInt.test.js +0 -24
  63. package/src/util/getURLParam.test.js +0 -18
  64. package/src/util/loadJSON.js +0 -10
  65. package/src/util/purgeObject.js +0 -13
  66. package/src/util/purgeObject.test.js +0 -8
  67. package/src/util/safeFloat.js +0 -31
  68. package/src/util/safeFloat.test.js +0 -13
  69. package/src/util/sanitizeURLParam.js +0 -11
  70. package/src/util/saveAsFile.js +0 -14
  71. package/src/util/setObjValueByPath.js +0 -26
  72. package/src/util/setObjValueByPath.test.js +0 -47
  73. package/src/util/underscoreToCamelCase.js +0 -10
  74. package/src/util/underscoreToCamelCase.test.js +0 -7
  75. package/typedefs/global.d.ts +0 -5
  76. package/types/util/addLeadingZero.d.ts +0 -2
  77. package/types/util/addLeadingZero.d.ts.map +0 -1
  78. package/types/util/capitalize.d.ts +0 -2
  79. package/types/util/capitalize.d.ts.map +0 -1
  80. package/types/util/deepMerge.d.ts +0 -2
  81. package/types/util/deepMerge.d.ts.map +0 -1
  82. package/types/util/deg2rad.d.ts +0 -2
  83. package/types/util/deg2rad.d.ts.map +0 -1
  84. package/types/util/delayPromise.d.ts +0 -2
  85. package/types/util/delayPromise.d.ts.map +0 -1
  86. package/types/util/fetchRetry.d.ts.map +0 -1
  87. package/types/util/fixFloatPrecision.d.ts +0 -7
  88. package/types/util/fixFloatPrecision.d.ts.map +0 -1
  89. package/types/util/getErrorDetails.d.ts.map +0 -1
  90. package/types/util/getObjArrayPropSum.d.ts +0 -2
  91. package/types/util/getObjArrayPropSum.d.ts.map +0 -1
  92. package/types/util/getObjValueByPath.d.ts +0 -2
  93. package/types/util/getObjValueByPath.d.ts.map +0 -1
  94. package/types/util/getRandomInt.d.ts +0 -2
  95. package/types/util/getRandomInt.d.ts.map +0 -1
  96. package/types/util/getURLParam.d.ts.map +0 -1
  97. package/types/util/loadJSON.d.ts +0 -7
  98. package/types/util/loadJSON.d.ts.map +0 -1
  99. package/types/util/purgeObject.d.ts +0 -2
  100. package/types/util/purgeObject.d.ts.map +0 -1
  101. package/types/util/safeFloat.d.ts +0 -22
  102. package/types/util/safeFloat.d.ts.map +0 -1
  103. package/types/util/sanitizeURLParam.d.ts +0 -2
  104. package/types/util/sanitizeURLParam.d.ts.map +0 -1
  105. package/types/util/saveAsFile.d.ts +0 -2
  106. package/types/util/saveAsFile.d.ts.map +0 -1
  107. package/types/util/serverDataToState.d.ts.map +0 -1
  108. package/types/util/setObjValueByPath.d.ts +0 -2
  109. package/types/util/setObjValueByPath.d.ts.map +0 -1
  110. package/types/util/underscoreToCamelCase.d.ts +0 -2
  111. package/types/util/underscoreToCamelCase.d.ts.map +0 -1
  112. /package/src/util/{getErrorDetails.js → error.js} +0 -0
@@ -1,22 +0,0 @@
1
- /**
2
- * Convenience method for floating point precision handling.
3
- * @param {number} value - The number to process.
4
- * @param {number} p - The precision. Defaults to 2.
5
- * @returns {number} The processed value.
6
- */
7
- export function fixFloat(value: number, p?: number): number;
8
- /**
9
- * Adds two value with floating point precision.
10
- * @param {number} a - The number a.
11
- * @param {number} b - The number b.
12
- * @returns {number} The processed value.
13
- */
14
- export function addFloat(a: number, b: number): number;
15
- /**
16
- * Substracts two value with floating point precision.
17
- * @param {number} a - The number a.
18
- * @param {number} b - The number b.
19
- * @returns {number} The processed value.
20
- */
21
- export function subFloat(a: number, b: number): number;
22
- //# sourceMappingURL=safeFloat.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"safeFloat.d.ts","sourceRoot":"","sources":["../../src/util/safeFloat.js"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,gCAJW,MAAM,MACN,MAAM,GACJ,MAAM,CAIlB;AAED;;;;;GAKG;AACH,4BAJW,MAAM,KACN,MAAM,GACJ,MAAM,CAKlB;AAED;;;;;GAKG;AACH,4BAJW,MAAM,KACN,MAAM,GACJ,MAAM,CAKlB"}
@@ -1,2 +0,0 @@
1
- export function sanitizeURLParam(input: string): string;
2
- //# sourceMappingURL=sanitizeURLParam.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sanitizeURLParam.d.ts","sourceRoot":"","sources":["../../src/util/sanitizeURLParam.js"],"names":[],"mappings":"AAKO,wCAHI,MAAM,GACJ,MAAM,CAOlB"}
@@ -1,2 +0,0 @@
1
- export function saveAsFile(filename: string, text: string): void;
2
- //# sourceMappingURL=saveAsFile.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"saveAsFile.d.ts","sourceRoot":"","sources":["../../src/util/saveAsFile.js"],"names":[],"mappings":"AAKO,qCAHI,MAAM,QACN,MAAM,QAUhB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"serverDataToState.d.ts","sourceRoot":"","sources":["../../src/util/serverDataToState.js"],"names":[],"mappings":"AAQO,wCAJI,MAAM,gBACN,OAAO,GACL,MAAM,CAiBlB"}
@@ -1,2 +0,0 @@
1
- export function setObjValueByPath(obj: object, path: string, value: object | null | undefined): void;
2
- //# sourceMappingURL=setObjValueByPath.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"setObjValueByPath.d.ts","sourceRoot":"","sources":["../../src/util/setObjValueByPath.js"],"names":[],"mappings":"AAOO,uCALI,MAAM,QACN,MAAM,SACN,MAAM,GAAG,IAAI,GAAG,SAAS,QAqBnC"}
@@ -1,2 +0,0 @@
1
- export function underscoreToCamelCase(value: string): string;
2
- //# sourceMappingURL=underscoreToCamelCase.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"underscoreToCamelCase.d.ts","sourceRoot":"","sources":["../../src/util/underscoreToCamelCase.js"],"names":[],"mappings":"AAKO,6CAHI,MAAM,GACJ,MAAM,CAMlB"}
File without changes