@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.
- package/agnostic/css/bem/index.js +3 -3
- package/agnostic/html/hyper-json/cast/index.js +6 -6
- package/agnostic/html/hyper-json/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/add/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/addclass/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/and/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/append/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/at/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/call/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/clone/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/deleteproperties/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/equals/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/getattribute/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/getproperties/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/getproperty/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/hjparse/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/hjstringify/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/if/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/initialize/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/join/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/length/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/map/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/negate/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/notrailing/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/or/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/pickrandom/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/populate/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/print/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/push/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/pusheach/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/recordtoarray/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/removeattribute/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/removeclass/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/renameproperty/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/replace/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/select/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/set/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/setattribute/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/setproperty/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/sorton/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/split/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/spread/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/toarray/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/toboolean/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/toelement/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/toggleclass/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/tonodelist/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/tonull/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/tonumber/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/torecord/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/toref/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/tostring/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/totext/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/transformselected/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/trim/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/isolated/boolean/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/isolated/element/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/isolated/get/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/isolated/global/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/isolated/guess/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/isolated/nodelist/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/isolated/number/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/isolated/record/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/isolated/ref/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/isolated/string/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/isolated/text/index.js +6 -6
- package/agnostic/html/hyper-json/tree/index.js +6 -6
- package/agnostic/html/hyper-json/utils/index.js +6 -6
- package/agnostic/misc/cast/index.js +49 -10
- package/agnostic/misc/crawler/index.d.ts +52 -26
- package/agnostic/misc/crawler/index.js +14 -4
- package/agnostic/objects/deep-get-property/index.test.d.ts +1 -0
- package/agnostic/objects/enums/is-in-enum/index.test.d.ts +1 -0
- package/agnostic/objects/flatten-getters/index.d.ts +2 -2
- package/agnostic/objects/flatten-getters/index.js +8 -17
- package/agnostic/objects/flatten-getters/index.test.d.ts +1 -0
- package/agnostic/objects/is-object/index.test.d.ts +1 -0
- package/agnostic/objects/is-record/index.test.d.ts +1 -0
- package/agnostic/objects/record-format/index.d.ts +25 -26
- package/agnostic/objects/record-format/index.js +1 -5
- package/agnostic/objects/record-format/index.test.d.ts +1 -0
- package/agnostic/objects/record-map/index.d.ts +5 -5
- package/agnostic/objects/record-map/index.test.d.ts +1 -0
- package/agnostic/objects/validation/index.test.d.ts +1 -0
- package/agnostic/optim/memoize/index.test.d.ts +1 -0
- package/agnostic/optim/throttle-debounce/index.js +1 -1
- package/agnostic/optim/throttle-debounce/index.test.d.ts +1 -0
- package/agnostic/random/hex-char/index.test.d.ts +1 -0
- package/agnostic/random/random/index.test.d.ts +1 -0
- package/agnostic/random/uuid/index.test.d.ts +1 -0
- package/agnostic/regexps/index.d.ts +5 -2
- package/agnostic/regexps/index.js +15 -3
- package/agnostic/regexps/index.test.d.ts +1 -0
- package/agnostic/sanitization/file-name/index.test.d.ts +1 -0
- package/agnostic/sanitization/path/index.test.d.ts +1 -0
- package/agnostic/sanitization/user-input/index.d.ts +2 -2
- package/agnostic/sanitization/user-input/index.js +13 -8
- package/agnostic/sanitization/user-input/index.test.d.ts +1 -0
- package/agnostic/typescript/types.d.ts +4 -0
- package/node/@google-cloud/storage/file/revoke-signed-urls/index.js +4 -4
- package/node/cloud-storage/operations/copy-dir/index.js +6 -6
- package/node/cloud-storage/operations/copy-file/index.js +3 -3
- package/node/cloud-storage/operations/download-file/index.js +3 -3
- package/node/cloud-storage/operations/exists-file/index.js +3 -3
- package/node/cloud-storage/operations/list-dir/index.js +3 -3
- package/node/cloud-storage/operations/move-dir/index.js +3 -3
- package/node/cloud-storage/operations/move-file/index.js +3 -3
- package/node/cloud-storage/operations/remove-dir/index.js +3 -3
- package/node/cloud-storage/operations/remove-file/index.js +3 -3
- package/node/cloud-storage/operations/stat-file/index.js +3 -3
- package/node/images/transform/index.js +26 -26
- package/package.json +1 -1
- package/chunks/chunk-YWSXCFYY.js +0 -61
- package/chunks/{chunk-7NIIWL3S.js → chunk-TAURL7GX.js} +16 -16
package/package.json
CHANGED
package/chunks/chunk-YWSXCFYY.js
DELETED
|
@@ -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
|
-
|
|
54
|
-
|
|
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;
|