@design-edito/tools 0.3.1 → 0.3.3

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 (114) hide show
  1. package/agnostic/css/bem/index.js +3 -3
  2. package/agnostic/html/hyper-json/cast/index.js +6 -6
  3. package/agnostic/html/hyper-json/index.js +6 -6
  4. package/agnostic/html/hyper-json/smart-tags/coalesced/add/index.js +6 -6
  5. package/agnostic/html/hyper-json/smart-tags/coalesced/addclass/index.js +6 -6
  6. package/agnostic/html/hyper-json/smart-tags/coalesced/and/index.js +6 -6
  7. package/agnostic/html/hyper-json/smart-tags/coalesced/append/index.js +6 -6
  8. package/agnostic/html/hyper-json/smart-tags/coalesced/at/index.js +6 -6
  9. package/agnostic/html/hyper-json/smart-tags/coalesced/call/index.js +6 -6
  10. package/agnostic/html/hyper-json/smart-tags/coalesced/clone/index.js +6 -6
  11. package/agnostic/html/hyper-json/smart-tags/coalesced/deleteproperties/index.js +6 -6
  12. package/agnostic/html/hyper-json/smart-tags/coalesced/equals/index.js +6 -6
  13. package/agnostic/html/hyper-json/smart-tags/coalesced/getattribute/index.js +6 -6
  14. package/agnostic/html/hyper-json/smart-tags/coalesced/getproperties/index.js +6 -6
  15. package/agnostic/html/hyper-json/smart-tags/coalesced/getproperty/index.js +6 -6
  16. package/agnostic/html/hyper-json/smart-tags/coalesced/hjparse/index.js +6 -6
  17. package/agnostic/html/hyper-json/smart-tags/coalesced/hjstringify/index.js +6 -6
  18. package/agnostic/html/hyper-json/smart-tags/coalesced/if/index.js +6 -6
  19. package/agnostic/html/hyper-json/smart-tags/coalesced/initialize/index.js +6 -6
  20. package/agnostic/html/hyper-json/smart-tags/coalesced/join/index.js +6 -6
  21. package/agnostic/html/hyper-json/smart-tags/coalesced/length/index.js +6 -6
  22. package/agnostic/html/hyper-json/smart-tags/coalesced/map/index.js +6 -6
  23. package/agnostic/html/hyper-json/smart-tags/coalesced/negate/index.js +6 -6
  24. package/agnostic/html/hyper-json/smart-tags/coalesced/notrailing/index.js +6 -6
  25. package/agnostic/html/hyper-json/smart-tags/coalesced/or/index.js +6 -6
  26. package/agnostic/html/hyper-json/smart-tags/coalesced/pickrandom/index.js +6 -6
  27. package/agnostic/html/hyper-json/smart-tags/coalesced/populate/index.js +6 -6
  28. package/agnostic/html/hyper-json/smart-tags/coalesced/print/index.js +6 -6
  29. package/agnostic/html/hyper-json/smart-tags/coalesced/push/index.js +6 -6
  30. package/agnostic/html/hyper-json/smart-tags/coalesced/pusheach/index.js +6 -6
  31. package/agnostic/html/hyper-json/smart-tags/coalesced/recordtoarray/index.js +6 -6
  32. package/agnostic/html/hyper-json/smart-tags/coalesced/removeattribute/index.js +6 -6
  33. package/agnostic/html/hyper-json/smart-tags/coalesced/removeclass/index.js +6 -6
  34. package/agnostic/html/hyper-json/smart-tags/coalesced/renameproperty/index.js +6 -6
  35. package/agnostic/html/hyper-json/smart-tags/coalesced/replace/index.js +6 -6
  36. package/agnostic/html/hyper-json/smart-tags/coalesced/select/index.js +6 -6
  37. package/agnostic/html/hyper-json/smart-tags/coalesced/set/index.js +6 -6
  38. package/agnostic/html/hyper-json/smart-tags/coalesced/setattribute/index.js +6 -6
  39. package/agnostic/html/hyper-json/smart-tags/coalesced/setproperty/index.js +6 -6
  40. package/agnostic/html/hyper-json/smart-tags/coalesced/sorton/index.js +6 -6
  41. package/agnostic/html/hyper-json/smart-tags/coalesced/split/index.js +6 -6
  42. package/agnostic/html/hyper-json/smart-tags/coalesced/spread/index.js +6 -6
  43. package/agnostic/html/hyper-json/smart-tags/coalesced/toarray/index.js +6 -6
  44. package/agnostic/html/hyper-json/smart-tags/coalesced/toboolean/index.js +6 -6
  45. package/agnostic/html/hyper-json/smart-tags/coalesced/toelement/index.js +6 -6
  46. package/agnostic/html/hyper-json/smart-tags/coalesced/toggleclass/index.js +6 -6
  47. package/agnostic/html/hyper-json/smart-tags/coalesced/tonodelist/index.js +6 -6
  48. package/agnostic/html/hyper-json/smart-tags/coalesced/tonull/index.js +6 -6
  49. package/agnostic/html/hyper-json/smart-tags/coalesced/tonumber/index.js +6 -6
  50. package/agnostic/html/hyper-json/smart-tags/coalesced/torecord/index.js +6 -6
  51. package/agnostic/html/hyper-json/smart-tags/coalesced/toref/index.js +6 -6
  52. package/agnostic/html/hyper-json/smart-tags/coalesced/tostring/index.js +6 -6
  53. package/agnostic/html/hyper-json/smart-tags/coalesced/totext/index.js +6 -6
  54. package/agnostic/html/hyper-json/smart-tags/coalesced/transformselected/index.js +6 -6
  55. package/agnostic/html/hyper-json/smart-tags/coalesced/trim/index.js +6 -6
  56. package/agnostic/html/hyper-json/smart-tags/isolated/boolean/index.js +6 -6
  57. package/agnostic/html/hyper-json/smart-tags/isolated/element/index.js +6 -6
  58. package/agnostic/html/hyper-json/smart-tags/isolated/get/index.js +6 -6
  59. package/agnostic/html/hyper-json/smart-tags/isolated/global/index.js +6 -6
  60. package/agnostic/html/hyper-json/smart-tags/isolated/guess/index.js +6 -6
  61. package/agnostic/html/hyper-json/smart-tags/isolated/nodelist/index.js +6 -6
  62. package/agnostic/html/hyper-json/smart-tags/isolated/number/index.js +6 -6
  63. package/agnostic/html/hyper-json/smart-tags/isolated/record/index.js +6 -6
  64. package/agnostic/html/hyper-json/smart-tags/isolated/ref/index.js +6 -6
  65. package/agnostic/html/hyper-json/smart-tags/isolated/string/index.js +6 -6
  66. package/agnostic/html/hyper-json/smart-tags/isolated/text/index.js +6 -6
  67. package/agnostic/html/hyper-json/tree/index.js +6 -6
  68. package/agnostic/html/hyper-json/utils/index.js +6 -6
  69. package/agnostic/misc/cast/index.js +49 -10
  70. package/agnostic/misc/crawler/index.d.ts +52 -26
  71. package/agnostic/misc/crawler/index.js +14 -4
  72. package/agnostic/objects/deep-get-property/index.test.d.ts +1 -0
  73. package/agnostic/objects/enums/is-in-enum/index.test.d.ts +1 -0
  74. package/agnostic/objects/flatten-getters/index.d.ts +2 -2
  75. package/agnostic/objects/flatten-getters/index.js +8 -17
  76. package/agnostic/objects/flatten-getters/index.test.d.ts +1 -0
  77. package/agnostic/objects/is-object/index.test.d.ts +1 -0
  78. package/agnostic/objects/is-record/index.test.d.ts +1 -0
  79. package/agnostic/objects/record-format/index.d.ts +25 -26
  80. package/agnostic/objects/record-format/index.js +1 -5
  81. package/agnostic/objects/record-format/index.test.d.ts +1 -0
  82. package/agnostic/objects/record-map/index.d.ts +5 -5
  83. package/agnostic/objects/record-map/index.test.d.ts +1 -0
  84. package/agnostic/objects/validation/index.test.d.ts +1 -0
  85. package/agnostic/optim/memoize/index.test.d.ts +1 -0
  86. package/agnostic/optim/throttle-debounce/index.js +1 -1
  87. package/agnostic/optim/throttle-debounce/index.test.d.ts +1 -0
  88. package/agnostic/random/hex-char/index.test.d.ts +1 -0
  89. package/agnostic/random/random/index.test.d.ts +1 -0
  90. package/agnostic/random/uuid/index.test.d.ts +1 -0
  91. package/agnostic/regexps/index.d.ts +5 -2
  92. package/agnostic/regexps/index.js +15 -3
  93. package/agnostic/regexps/index.test.d.ts +1 -0
  94. package/agnostic/sanitization/file-name/index.test.d.ts +1 -0
  95. package/agnostic/sanitization/path/index.test.d.ts +1 -0
  96. package/agnostic/sanitization/user-input/index.d.ts +2 -2
  97. package/agnostic/sanitization/user-input/index.js +13 -8
  98. package/agnostic/sanitization/user-input/index.test.d.ts +1 -0
  99. package/agnostic/typescript/types.d.ts +4 -0
  100. package/node/@google-cloud/storage/file/revoke-signed-urls/index.js +4 -4
  101. package/node/cloud-storage/operations/copy-dir/index.js +6 -6
  102. package/node/cloud-storage/operations/copy-file/index.js +3 -3
  103. package/node/cloud-storage/operations/download-file/index.js +3 -3
  104. package/node/cloud-storage/operations/exists-file/index.js +3 -3
  105. package/node/cloud-storage/operations/list-dir/index.js +3 -3
  106. package/node/cloud-storage/operations/move-dir/index.js +3 -3
  107. package/node/cloud-storage/operations/move-file/index.js +3 -3
  108. package/node/cloud-storage/operations/remove-dir/index.js +3 -3
  109. package/node/cloud-storage/operations/remove-file/index.js +3 -3
  110. package/node/cloud-storage/operations/stat-file/index.js +3 -3
  111. package/node/images/transform/index.js +26 -26
  112. package/package.json +1 -1
  113. package/chunks/chunk-YWSXCFYY.js +0 -61
  114. package/chunks/{chunk-7NIIWL3S.js → chunk-TAURL7GX.js} +16 -16
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@design-edito/tools",
3
- "version": "0.3.1",
3
+ "version": "0.3.3",
4
4
  "description": "",
5
5
  "author": "Maxime Fabas",
6
6
  "license": "ISC",
@@ -1,61 +0,0 @@
1
- import {
2
- isFalsy
3
- } from "./chunk-QXAJXTXV.js";
4
-
5
- // src/agnostic/misc/cast/index.ts
6
- function toBoolean(value) {
7
- if (typeof value === "boolean") return value;
8
- if (typeof value === "string") {
9
- if (value.toLowerCase().trim() === "true") return true;
10
- return false;
11
- }
12
- return !isFalsy(value);
13
- }
14
- function toNumber(value) {
15
- if (typeof value === "number") return value;
16
- if (typeof value === "string") return parseFloat(value);
17
- return 0;
18
- }
19
- function toString(value) {
20
- if (typeof value === "string") return value;
21
- return String(value);
22
- }
23
- function toNull(_value) {
24
- return null;
25
- }
26
- function toArray(value) {
27
- if (Array.isArray(value)) return value;
28
- if (typeof value === "object" && value !== null) return Object.entries(value);
29
- return [value];
30
- }
31
- function toNumberArr(value) {
32
- const arrValue = toArray(value);
33
- return arrValue.map((val) => toNumber(val));
34
- }
35
- function toRecord(value) {
36
- const record = {};
37
- try {
38
- Object.keys(value).forEach((key) => {
39
- record[key] = value[key];
40
- });
41
- } catch (err) {
42
- return record;
43
- }
44
- return record;
45
- }
46
- function toError(value) {
47
- if (value instanceof Error) return value;
48
- if (typeof value === "string") return new Error(value);
49
- return new Error(toString(value));
50
- }
51
-
52
- export {
53
- toBoolean,
54
- toNumber,
55
- toString,
56
- toNull,
57
- toArray,
58
- toNumberArr,
59
- toRecord,
60
- toError
61
- };
@@ -1,18 +1,18 @@
1
1
  import {
2
2
  nullFunc
3
3
  } from "./chunk-AKNR3U25.js";
4
- import {
5
- Types
6
- } from "./chunk-XEQ2PBT2.js";
7
- import {
8
- Serialize
9
- } from "./chunk-DUCLFPGE.js";
10
4
  import {
11
5
  any
12
6
  } from "./chunk-ZKIQ753F.js";
13
7
  import {
14
8
  array
15
9
  } from "./chunk-USIYKRNX.js";
10
+ import {
11
+ Types
12
+ } from "./chunk-XEQ2PBT2.js";
13
+ import {
14
+ Serialize
15
+ } from "./chunk-DUCLFPGE.js";
16
16
  import {
17
17
  SmartTags
18
18
  } from "./chunk-HEY7J6GI.js";
@@ -31,14 +31,6 @@ import {
31
31
  import {
32
32
  isInEnum
33
33
  } from "./chunk-E6MSDKON.js";
34
- import {
35
- makeFailure,
36
- makeSuccess,
37
- outcome_exports
38
- } from "./chunk-QEKI6WGQ.js";
39
- import {
40
- get
41
- } from "./chunk-ROWPCMQY.js";
42
34
  import {
43
35
  isRecord
44
36
  } from "./chunk-YDIBNEGA.js";
@@ -50,11 +42,19 @@ import {
50
42
  trimStart
51
43
  } from "./chunk-6XL25OZX.js";
52
44
  import {
53
- isNonNullObject
54
- } from "./chunk-HQLRJ7XW.js";
45
+ makeFailure,
46
+ makeSuccess,
47
+ outcome_exports
48
+ } from "./chunk-QEKI6WGQ.js";
49
+ import {
50
+ get
51
+ } from "./chunk-ROWPCMQY.js";
55
52
  import {
56
53
  unknownToString
57
54
  } from "./chunk-FENXVJYO.js";
55
+ import {
56
+ isNonNullObject
57
+ } from "./chunk-HQLRJ7XW.js";
58
58
 
59
59
  // src/agnostic/html/hyper-json/cast/index.ts
60
60
  var Cast;