@design-edito/tools 0.3.0 → 0.3.2
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/arrays/is-array-of/index.js +1 -1
- package/agnostic/colors/channels/index.js +3 -3
- package/agnostic/colors/contrast/index.js +3 -3
- package/agnostic/colors/convert/index.js +2 -2
- package/agnostic/colors/distance/index.js +2 -2
- package/agnostic/colors/grayscale/index.js +2 -2
- package/agnostic/colors/invert/index.js +2 -2
- package/agnostic/colors/lerp/index.js +2 -2
- package/agnostic/colors/luminance/index.js +3 -3
- package/agnostic/colors/palette/index.js +4 -4
- package/agnostic/colors/rotate/index.js +4 -4
- package/agnostic/colors/tidy/index.js +2 -2
- package/agnostic/{numbers/responsive-harmonics → css/scale}/index.d.ts +7 -17
- package/agnostic/{numbers/responsive-harmonics → css/scale}/index.js +18 -30
- package/agnostic/css/scale/index.test.d.ts +1 -0
- package/agnostic/html/hyper-json/cast/index.js +4 -4
- package/agnostic/html/hyper-json/index.js +4 -4
- package/agnostic/html/hyper-json/serialize/index.js +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/add/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/addclass/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/and/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/append/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/at/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/call/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/clone/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/deleteproperties/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/equals/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/getattribute/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/getproperties/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/getproperty/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/hjparse/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/hjstringify/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/if/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/initialize/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/join/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/length/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/map/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/negate/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/notrailing/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/or/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/pickrandom/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/populate/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/print/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/push/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/pusheach/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/recordtoarray/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/removeattribute/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/removeclass/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/renameproperty/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/replace/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/select/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/set/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/setattribute/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/setproperty/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/sorton/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/split/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/spread/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/toarray/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/toboolean/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/toelement/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/toggleclass/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/tonodelist/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/tonull/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/tonumber/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/torecord/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/toref/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/tostring/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/totext/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/transformselected/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/trim/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/isolated/boolean/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/isolated/element/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/isolated/get/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/isolated/global/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/isolated/guess/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/isolated/nodelist/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/isolated/number/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/isolated/record/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/isolated/ref/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/isolated/string/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/isolated/text/index.js +4 -4
- package/agnostic/html/hyper-json/tree/index.js +4 -4
- package/agnostic/html/hyper-json/utils/index.js +4 -4
- package/agnostic/misc/assert/index.js +3 -3
- package/agnostic/misc/cast/index.js +49 -10
- package/agnostic/misc/crawler/index.d.ts +4 -2
- package/agnostic/misc/crawler/index.js +2 -2
- package/agnostic/misc/is-constructor-function/index.js +1 -1
- package/agnostic/numbers/geometric-progressions/index.d.ts +14 -0
- package/agnostic/numbers/geometric-progressions/index.js +7 -0
- package/agnostic/numbers/geometric-progressions/index.test.d.ts +1 -0
- 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/chunks/chunk-5H3IRSOB.js +8 -0
- package/chunks/{chunk-P6K7NPUZ.js → chunk-6KOJFWH3.js} +1 -1
- package/chunks/chunk-ASXK7XCC.js +18 -0
- package/chunks/{chunk-PC62QFWI.js → chunk-FXISVWGE.js} +1 -1
- package/chunks/{chunk-ASNS7K6J.js → chunk-HMPY32F7.js} +1 -1
- package/chunks/{chunk-UL4SNGRK.js → chunk-MSAAQTCE.js} +4 -4
- package/chunks/{chunk-33SNWUIB.js → chunk-MZYCKOLN.js} +1 -1
- package/chunks/{chunk-AOR2M2H3.js → chunk-QFBVETGF.js} +1 -1
- package/chunks/{chunk-RJK53Q5I.js → chunk-TLWVLCIQ.js} +1 -1
- package/chunks/{chunk-THWQ7NVE.js → chunk-TTJXJX4E.js} +2 -2
- package/chunks/{chunk-QWBT7W6I.js → chunk-UR5BUIPU.js} +1 -1
- package/node/@aws-s3/storage/directory/copy-dir/index.js +2 -2
- package/node/@aws-s3/storage/directory/list/index.js +2 -2
- package/node/@aws-s3/storage/directory/move-dir/index.js +2 -2
- package/node/@aws-s3/storage/directory/remove-dir/index.js +2 -2
- package/node/@aws-s3/storage/file/copy/index.js +2 -2
- package/node/@aws-s3/storage/file/download/index.js +2 -2
- package/node/@aws-s3/storage/file/exists/index.js +2 -2
- package/node/@aws-s3/storage/file/move/index.js +2 -2
- package/node/@aws-s3/storage/file/remove/index.js +2 -2
- package/node/@aws-s3/storage/file/stat/index.js +2 -2
- package/node/@aws-s3/storage/file/upload/index.js +2 -2
- package/node/@express/@multer/index.js +3 -3
- package/node/@google-cloud/storage/bucket/get-metadata/index.js +3 -3
- package/node/@google-cloud/storage/directory/copy-dir/index.js +2 -2
- package/node/@google-cloud/storage/directory/list/index.js +2 -2
- package/node/@google-cloud/storage/directory/move-dir/index.js +2 -2
- package/node/@google-cloud/storage/directory/remove-dir/index.js +2 -2
- package/node/@google-cloud/storage/file/copy/index.js +2 -2
- package/node/@google-cloud/storage/file/download/index.js +2 -2
- package/node/@google-cloud/storage/file/exists/index.js +2 -2
- package/node/@google-cloud/storage/file/generate-signed-url/index.js +3 -3
- package/node/@google-cloud/storage/file/get-metadata/index.js +3 -3
- package/node/@google-cloud/storage/file/get-permissions/index.js +3 -3
- package/node/@google-cloud/storage/file/move/index.js +2 -2
- package/node/@google-cloud/storage/file/remove/index.js +2 -2
- package/node/@google-cloud/storage/file/revoke-signed-urls/index.js +6 -6
- package/node/@google-cloud/storage/file/stat/index.js +2 -2
- package/node/@google-cloud/storage/file/update-metadata/index.js +3 -3
- package/node/@google-cloud/storage/file/upload/index.js +2 -2
- package/node/cloud-storage/operations/copy-dir/index.js +5 -5
- package/node/cloud-storage/operations/copy-file/index.js +5 -5
- package/node/cloud-storage/operations/download-file/index.js +5 -5
- package/node/cloud-storage/operations/exists-file/index.js +5 -5
- package/node/cloud-storage/operations/list-dir/index.js +5 -5
- package/node/cloud-storage/operations/move-dir/index.js +5 -5
- package/node/cloud-storage/operations/move-file/index.js +5 -5
- package/node/cloud-storage/operations/remove-dir/index.js +5 -5
- package/node/cloud-storage/operations/remove-file/index.js +5 -5
- package/node/cloud-storage/operations/stat-file/index.js +5 -5
- package/node/cloud-storage/operations/upload-file/index.js +5 -5
- package/node/encryption/@aes-256-gcm/buffer/index.js +2 -2
- package/node/encryption/@aes-256-gcm/uint8-array/index.js +2 -2
- package/node/ftps/directory/copy-dir/index.js +2 -2
- package/node/ftps/directory/list/index.js +2 -2
- package/node/ftps/directory/move-dir/index.js +2 -2
- package/node/ftps/directory/remove-dir/index.js +2 -2
- package/node/ftps/file/copy/index.js +2 -2
- package/node/ftps/file/download/index.js +2 -2
- package/node/ftps/file/exists/index.js +2 -2
- package/node/ftps/file/move/index.js +2 -2
- package/node/ftps/file/remove/index.js +2 -2
- package/node/ftps/file/stat/index.js +2 -2
- package/node/ftps/file/upload/index.js +2 -2
- package/node/images/create/index.js +3 -3
- package/node/images/format/index.js +3 -3
- package/node/images/metadata/index.js +3 -3
- package/node/images/transform/index.js +33 -33
- package/node/images/transform/operations/extend/index.js +4 -4
- package/node/images/transform/operations/flatten/index.js +4 -4
- package/node/images/transform/operations/overlay/index.js +4 -4
- package/node/images/transform/operations/resize/index.js +4 -4
- package/node/images/transform/operations/rotate/index.js +4 -4
- package/node/images/utils/index.js +3 -3
- package/node/process/spawner/index.js +3 -3
- package/node/sftp/directory/copy-dir/index.js +2 -2
- package/node/sftp/directory/list/index.js +2 -2
- package/node/sftp/directory/move-dir/index.js +2 -2
- package/node/sftp/directory/remove-dir/index.js +2 -2
- package/node/sftp/file/copy/index.js +2 -2
- package/node/sftp/file/download/index.js +2 -2
- package/node/sftp/file/exists/index.js +2 -2
- package/node/sftp/file/move/index.js +2 -2
- package/node/sftp/file/remove/index.js +2 -2
- package/node/sftp/file/stat/index.js +2 -2
- package/node/sftp/file/upload/index.js +2 -2
- package/package.json +1 -1
- package/agnostic/misc/elo/index.d.ts +0 -29
- package/agnostic/misc/elo/index.js +0 -31
- package/chunks/chunk-RCO57B6F.js +0 -9
- package/chunks/chunk-YWSXCFYY.js +0 -61
- package/chunks/{chunk-AV373PHY.js → chunk-2OGNVG5X.js} +3 -3
- package/chunks/{chunk-SBBIQ5UH.js → chunk-4ARE376R.js} +3 -3
- package/chunks/{chunk-O7UCJNVF.js → chunk-4WO4M2HE.js} +3 -3
- package/chunks/{chunk-66BURDRK.js → chunk-5DJBOYRY.js} +3 -3
- package/chunks/{chunk-7B2E2NGH.js → chunk-5LCPENF6.js} +3 -3
- package/chunks/{chunk-FH74QWR6.js → chunk-6652JQFX.js} +3 -3
- package/chunks/{chunk-6BGIDRU5.js → chunk-6GINUDWK.js} +3 -3
- package/chunks/{chunk-5O52VUI6.js → chunk-7OWHDBUD.js} +3 -3
- package/chunks/{chunk-BQXTV2GG.js → chunk-AFQ6FUT2.js} +3 -3
- package/chunks/{chunk-EBQRPRRC.js → chunk-B4BXEVMI.js} +3 -3
- package/chunks/{chunk-FSI422YG.js → chunk-BOI2VKM7.js} +3 -3
- package/chunks/{chunk-AOEOW5XW.js → chunk-CDIXAYVL.js} +3 -3
- package/chunks/{chunk-BQABPH3I.js → chunk-D3J6JAJW.js} +3 -3
- package/chunks/{chunk-6YVXSCRH.js → chunk-EZVE2V6Z.js} +3 -3
- package/chunks/{chunk-PTN2V757.js → chunk-FBWBGFRA.js} +3 -3
- package/chunks/{chunk-AXMAF3J2.js → chunk-FML7BURX.js} +3 -3
- package/chunks/{chunk-O66PEU62.js → chunk-GDSDQ3UB.js} +3 -3
- package/chunks/{chunk-5X76KDYN.js → chunk-GFYAOPTP.js} +3 -3
- package/chunks/{chunk-JU23NBY2.js → chunk-GICC2TWR.js} +3 -3
- package/chunks/{chunk-DBNCEHTT.js → chunk-GOKDRSAD.js} +3 -3
- package/chunks/{chunk-54KPQCVI.js → chunk-IV6JXJNW.js} +3 -3
- package/chunks/{chunk-DBZAJJUF.js → chunk-J45Y3CWM.js} +3 -3
- package/chunks/{chunk-FM3HGCFL.js → chunk-JCXDI6AD.js} +3 -3
- package/chunks/{chunk-IBQQCUYV.js → chunk-JPNVNAO4.js} +3 -3
- package/chunks/{chunk-RGQNRTBI.js → chunk-KEGTGEAM.js} +3 -3
- package/chunks/{chunk-EEPLTO3E.js → chunk-LBK4TBXP.js} +3 -3
- package/chunks/{chunk-VU6JYR3W.js → chunk-MFL7PQWJ.js} +3 -3
- package/chunks/{chunk-JFXEMK66.js → chunk-NONFIHGT.js} +3 -3
- package/chunks/{chunk-BXFRBV67.js → chunk-OCDUURXM.js} +3 -3
- package/chunks/{chunk-NIIAUOBO.js → chunk-PA6C6P2W.js} +3 -3
- package/chunks/{chunk-J5D4OQ5U.js → chunk-Q6Y27PHJ.js} +3 -3
- package/chunks/{chunk-UZ4SWSOZ.js → chunk-QD6KZUTV.js} +3 -3
- package/chunks/{chunk-OF2W4ZRG.js → chunk-RC7TRCNX.js} +3 -3
- package/chunks/{chunk-LU47ASMQ.js → chunk-RNXRHCHQ.js} +3 -3
- package/chunks/{chunk-ZTPRFEPV.js → chunk-S2YRVCQ4.js} +3 -3
- package/chunks/{chunk-QQO4QKH2.js → chunk-SJ54QLKA.js} +10 -10
- package/chunks/{chunk-JN2UETL4.js → chunk-SNB7HA6G.js} +3 -3
- package/chunks/{chunk-S2I77NEE.js → chunk-T3F3S6XV.js} +3 -3
- package/chunks/{chunk-S6ZFFGWH.js → chunk-TKAWYSFV.js} +3 -3
- package/chunks/{chunk-YOP6WVCF.js → chunk-UVYVJF5Q.js} +3 -3
- package/chunks/{chunk-BHGRXDTS.js → chunk-VRVBSI2L.js} +3 -3
- package/chunks/{chunk-NEMHJSNM.js → chunk-VYVVS4LW.js} +3 -3
- package/chunks/{chunk-2WSVYQ5Q.js → chunk-W7VDFL7P.js} +3 -3
- package/chunks/{chunk-Y6FD4ASO.js → chunk-XKELYCHB.js} +3 -3
- package/chunks/{chunk-VYDUHDXW.js → chunk-XVH447XG.js} +3 -3
- package/chunks/{chunk-ULYGDEW2.js → chunk-Z352FGUT.js} +3 -3
- package/chunks/{chunk-W5VY535B.js → chunk-ZE5QOQM6.js} +3 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
nodelist
|
|
3
|
-
} from "../../../../../../chunks/chunk-
|
|
3
|
+
} from "../../../../../../chunks/chunk-SJ54QLKA.js";
|
|
4
4
|
import "../../../../../../chunks/chunk-AKNR3U25.js";
|
|
5
5
|
import "../../../../../../chunks/chunk-XEQ2PBT2.js";
|
|
6
6
|
import "../../../../../../chunks/chunk-USIYKRNX.js";
|
|
@@ -11,13 +11,13 @@ import "../../../../../../chunks/chunk-DUCLFPGE.js";
|
|
|
11
11
|
import "../../../../../../chunks/chunk-JVMFT3IT.js";
|
|
12
12
|
import "../../../../../../chunks/chunk-RW7VAKJW.js";
|
|
13
13
|
import "../../../../../../chunks/chunk-XNF5MLCQ.js";
|
|
14
|
-
import "../../../../../../chunks/chunk-E6MSDKON.js";
|
|
15
14
|
import "../../../../../../chunks/chunk-YDIBNEGA.js";
|
|
16
|
-
import "../../../../../../chunks/chunk-
|
|
15
|
+
import "../../../../../../chunks/chunk-E6MSDKON.js";
|
|
17
16
|
import "../../../../../../chunks/chunk-6XL25OZX.js";
|
|
18
|
-
import "../../../../../../chunks/chunk-QEKI6WGQ.js";
|
|
19
17
|
import "../../../../../../chunks/chunk-ROWPCMQY.js";
|
|
20
18
|
import "../../../../../../chunks/chunk-FENXVJYO.js";
|
|
19
|
+
import "../../../../../../chunks/chunk-EPUHVR7J.js";
|
|
20
|
+
import "../../../../../../chunks/chunk-QEKI6WGQ.js";
|
|
21
21
|
import "../../../../../../chunks/chunk-HQLRJ7XW.js";
|
|
22
22
|
import "../../../../../../chunks/chunk-XCBH6NLF.js";
|
|
23
23
|
export {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
number
|
|
3
|
-
} from "../../../../../../chunks/chunk-
|
|
3
|
+
} from "../../../../../../chunks/chunk-SJ54QLKA.js";
|
|
4
4
|
import "../../../../../../chunks/chunk-AKNR3U25.js";
|
|
5
5
|
import "../../../../../../chunks/chunk-XEQ2PBT2.js";
|
|
6
6
|
import "../../../../../../chunks/chunk-USIYKRNX.js";
|
|
@@ -11,13 +11,13 @@ import "../../../../../../chunks/chunk-DUCLFPGE.js";
|
|
|
11
11
|
import "../../../../../../chunks/chunk-JVMFT3IT.js";
|
|
12
12
|
import "../../../../../../chunks/chunk-RW7VAKJW.js";
|
|
13
13
|
import "../../../../../../chunks/chunk-XNF5MLCQ.js";
|
|
14
|
-
import "../../../../../../chunks/chunk-E6MSDKON.js";
|
|
15
14
|
import "../../../../../../chunks/chunk-YDIBNEGA.js";
|
|
16
|
-
import "../../../../../../chunks/chunk-
|
|
15
|
+
import "../../../../../../chunks/chunk-E6MSDKON.js";
|
|
17
16
|
import "../../../../../../chunks/chunk-6XL25OZX.js";
|
|
18
|
-
import "../../../../../../chunks/chunk-QEKI6WGQ.js";
|
|
19
17
|
import "../../../../../../chunks/chunk-ROWPCMQY.js";
|
|
20
18
|
import "../../../../../../chunks/chunk-FENXVJYO.js";
|
|
19
|
+
import "../../../../../../chunks/chunk-EPUHVR7J.js";
|
|
20
|
+
import "../../../../../../chunks/chunk-QEKI6WGQ.js";
|
|
21
21
|
import "../../../../../../chunks/chunk-HQLRJ7XW.js";
|
|
22
22
|
import "../../../../../../chunks/chunk-XCBH6NLF.js";
|
|
23
23
|
export {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
record
|
|
3
|
-
} from "../../../../../../chunks/chunk-
|
|
3
|
+
} from "../../../../../../chunks/chunk-SJ54QLKA.js";
|
|
4
4
|
import "../../../../../../chunks/chunk-AKNR3U25.js";
|
|
5
5
|
import "../../../../../../chunks/chunk-XEQ2PBT2.js";
|
|
6
6
|
import "../../../../../../chunks/chunk-USIYKRNX.js";
|
|
@@ -11,13 +11,13 @@ import "../../../../../../chunks/chunk-DUCLFPGE.js";
|
|
|
11
11
|
import "../../../../../../chunks/chunk-JVMFT3IT.js";
|
|
12
12
|
import "../../../../../../chunks/chunk-RW7VAKJW.js";
|
|
13
13
|
import "../../../../../../chunks/chunk-XNF5MLCQ.js";
|
|
14
|
-
import "../../../../../../chunks/chunk-E6MSDKON.js";
|
|
15
14
|
import "../../../../../../chunks/chunk-YDIBNEGA.js";
|
|
16
|
-
import "../../../../../../chunks/chunk-
|
|
15
|
+
import "../../../../../../chunks/chunk-E6MSDKON.js";
|
|
17
16
|
import "../../../../../../chunks/chunk-6XL25OZX.js";
|
|
18
|
-
import "../../../../../../chunks/chunk-QEKI6WGQ.js";
|
|
19
17
|
import "../../../../../../chunks/chunk-ROWPCMQY.js";
|
|
20
18
|
import "../../../../../../chunks/chunk-FENXVJYO.js";
|
|
19
|
+
import "../../../../../../chunks/chunk-EPUHVR7J.js";
|
|
20
|
+
import "../../../../../../chunks/chunk-QEKI6WGQ.js";
|
|
21
21
|
import "../../../../../../chunks/chunk-HQLRJ7XW.js";
|
|
22
22
|
import "../../../../../../chunks/chunk-XCBH6NLF.js";
|
|
23
23
|
export {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
func,
|
|
3
3
|
ref
|
|
4
|
-
} from "../../../../../../chunks/chunk-
|
|
4
|
+
} from "../../../../../../chunks/chunk-SJ54QLKA.js";
|
|
5
5
|
import "../../../../../../chunks/chunk-AKNR3U25.js";
|
|
6
6
|
import "../../../../../../chunks/chunk-XEQ2PBT2.js";
|
|
7
7
|
import "../../../../../../chunks/chunk-USIYKRNX.js";
|
|
@@ -12,13 +12,13 @@ import "../../../../../../chunks/chunk-DUCLFPGE.js";
|
|
|
12
12
|
import "../../../../../../chunks/chunk-JVMFT3IT.js";
|
|
13
13
|
import "../../../../../../chunks/chunk-RW7VAKJW.js";
|
|
14
14
|
import "../../../../../../chunks/chunk-XNF5MLCQ.js";
|
|
15
|
-
import "../../../../../../chunks/chunk-E6MSDKON.js";
|
|
16
15
|
import "../../../../../../chunks/chunk-YDIBNEGA.js";
|
|
17
|
-
import "../../../../../../chunks/chunk-
|
|
16
|
+
import "../../../../../../chunks/chunk-E6MSDKON.js";
|
|
18
17
|
import "../../../../../../chunks/chunk-6XL25OZX.js";
|
|
19
|
-
import "../../../../../../chunks/chunk-QEKI6WGQ.js";
|
|
20
18
|
import "../../../../../../chunks/chunk-ROWPCMQY.js";
|
|
21
19
|
import "../../../../../../chunks/chunk-FENXVJYO.js";
|
|
20
|
+
import "../../../../../../chunks/chunk-EPUHVR7J.js";
|
|
21
|
+
import "../../../../../../chunks/chunk-QEKI6WGQ.js";
|
|
22
22
|
import "../../../../../../chunks/chunk-HQLRJ7XW.js";
|
|
23
23
|
import "../../../../../../chunks/chunk-XCBH6NLF.js";
|
|
24
24
|
export {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
string
|
|
3
|
-
} from "../../../../../../chunks/chunk-
|
|
3
|
+
} from "../../../../../../chunks/chunk-SJ54QLKA.js";
|
|
4
4
|
import "../../../../../../chunks/chunk-AKNR3U25.js";
|
|
5
5
|
import "../../../../../../chunks/chunk-XEQ2PBT2.js";
|
|
6
6
|
import "../../../../../../chunks/chunk-USIYKRNX.js";
|
|
@@ -11,13 +11,13 @@ import "../../../../../../chunks/chunk-DUCLFPGE.js";
|
|
|
11
11
|
import "../../../../../../chunks/chunk-JVMFT3IT.js";
|
|
12
12
|
import "../../../../../../chunks/chunk-RW7VAKJW.js";
|
|
13
13
|
import "../../../../../../chunks/chunk-XNF5MLCQ.js";
|
|
14
|
-
import "../../../../../../chunks/chunk-E6MSDKON.js";
|
|
15
14
|
import "../../../../../../chunks/chunk-YDIBNEGA.js";
|
|
16
|
-
import "../../../../../../chunks/chunk-
|
|
15
|
+
import "../../../../../../chunks/chunk-E6MSDKON.js";
|
|
17
16
|
import "../../../../../../chunks/chunk-6XL25OZX.js";
|
|
18
|
-
import "../../../../../../chunks/chunk-QEKI6WGQ.js";
|
|
19
17
|
import "../../../../../../chunks/chunk-ROWPCMQY.js";
|
|
20
18
|
import "../../../../../../chunks/chunk-FENXVJYO.js";
|
|
19
|
+
import "../../../../../../chunks/chunk-EPUHVR7J.js";
|
|
20
|
+
import "../../../../../../chunks/chunk-QEKI6WGQ.js";
|
|
21
21
|
import "../../../../../../chunks/chunk-HQLRJ7XW.js";
|
|
22
22
|
import "../../../../../../chunks/chunk-XCBH6NLF.js";
|
|
23
23
|
export {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
text
|
|
3
|
-
} from "../../../../../../chunks/chunk-
|
|
3
|
+
} from "../../../../../../chunks/chunk-SJ54QLKA.js";
|
|
4
4
|
import "../../../../../../chunks/chunk-AKNR3U25.js";
|
|
5
5
|
import "../../../../../../chunks/chunk-XEQ2PBT2.js";
|
|
6
6
|
import "../../../../../../chunks/chunk-USIYKRNX.js";
|
|
@@ -11,13 +11,13 @@ import "../../../../../../chunks/chunk-DUCLFPGE.js";
|
|
|
11
11
|
import "../../../../../../chunks/chunk-JVMFT3IT.js";
|
|
12
12
|
import "../../../../../../chunks/chunk-RW7VAKJW.js";
|
|
13
13
|
import "../../../../../../chunks/chunk-XNF5MLCQ.js";
|
|
14
|
-
import "../../../../../../chunks/chunk-E6MSDKON.js";
|
|
15
14
|
import "../../../../../../chunks/chunk-YDIBNEGA.js";
|
|
16
|
-
import "../../../../../../chunks/chunk-
|
|
15
|
+
import "../../../../../../chunks/chunk-E6MSDKON.js";
|
|
17
16
|
import "../../../../../../chunks/chunk-6XL25OZX.js";
|
|
18
|
-
import "../../../../../../chunks/chunk-QEKI6WGQ.js";
|
|
19
17
|
import "../../../../../../chunks/chunk-ROWPCMQY.js";
|
|
20
18
|
import "../../../../../../chunks/chunk-FENXVJYO.js";
|
|
19
|
+
import "../../../../../../chunks/chunk-EPUHVR7J.js";
|
|
20
|
+
import "../../../../../../chunks/chunk-QEKI6WGQ.js";
|
|
21
21
|
import "../../../../../../chunks/chunk-HQLRJ7XW.js";
|
|
22
22
|
import "../../../../../../chunks/chunk-XCBH6NLF.js";
|
|
23
23
|
export {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Tree
|
|
3
|
-
} from "../../../../chunks/chunk-
|
|
3
|
+
} from "../../../../chunks/chunk-SJ54QLKA.js";
|
|
4
4
|
import "../../../../chunks/chunk-AKNR3U25.js";
|
|
5
5
|
import "../../../../chunks/chunk-XEQ2PBT2.js";
|
|
6
6
|
import "../../../../chunks/chunk-USIYKRNX.js";
|
|
@@ -11,13 +11,13 @@ import "../../../../chunks/chunk-DUCLFPGE.js";
|
|
|
11
11
|
import "../../../../chunks/chunk-JVMFT3IT.js";
|
|
12
12
|
import "../../../../chunks/chunk-RW7VAKJW.js";
|
|
13
13
|
import "../../../../chunks/chunk-XNF5MLCQ.js";
|
|
14
|
-
import "../../../../chunks/chunk-E6MSDKON.js";
|
|
15
14
|
import "../../../../chunks/chunk-YDIBNEGA.js";
|
|
16
|
-
import "../../../../chunks/chunk-
|
|
15
|
+
import "../../../../chunks/chunk-E6MSDKON.js";
|
|
17
16
|
import "../../../../chunks/chunk-6XL25OZX.js";
|
|
18
|
-
import "../../../../chunks/chunk-QEKI6WGQ.js";
|
|
19
17
|
import "../../../../chunks/chunk-ROWPCMQY.js";
|
|
20
18
|
import "../../../../chunks/chunk-FENXVJYO.js";
|
|
19
|
+
import "../../../../chunks/chunk-EPUHVR7J.js";
|
|
20
|
+
import "../../../../chunks/chunk-QEKI6WGQ.js";
|
|
21
21
|
import "../../../../chunks/chunk-HQLRJ7XW.js";
|
|
22
22
|
import "../../../../chunks/chunk-XCBH6NLF.js";
|
|
23
23
|
export {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Utils
|
|
3
|
-
} from "../../../../chunks/chunk-
|
|
3
|
+
} from "../../../../chunks/chunk-SJ54QLKA.js";
|
|
4
4
|
import "../../../../chunks/chunk-AKNR3U25.js";
|
|
5
5
|
import "../../../../chunks/chunk-XEQ2PBT2.js";
|
|
6
6
|
import "../../../../chunks/chunk-USIYKRNX.js";
|
|
@@ -11,13 +11,13 @@ import "../../../../chunks/chunk-DUCLFPGE.js";
|
|
|
11
11
|
import "../../../../chunks/chunk-JVMFT3IT.js";
|
|
12
12
|
import "../../../../chunks/chunk-RW7VAKJW.js";
|
|
13
13
|
import "../../../../chunks/chunk-XNF5MLCQ.js";
|
|
14
|
-
import "../../../../chunks/chunk-E6MSDKON.js";
|
|
15
14
|
import "../../../../chunks/chunk-YDIBNEGA.js";
|
|
16
|
-
import "../../../../chunks/chunk-
|
|
15
|
+
import "../../../../chunks/chunk-E6MSDKON.js";
|
|
17
16
|
import "../../../../chunks/chunk-6XL25OZX.js";
|
|
18
|
-
import "../../../../chunks/chunk-QEKI6WGQ.js";
|
|
19
17
|
import "../../../../chunks/chunk-ROWPCMQY.js";
|
|
20
18
|
import "../../../../chunks/chunk-FENXVJYO.js";
|
|
19
|
+
import "../../../../chunks/chunk-EPUHVR7J.js";
|
|
20
|
+
import "../../../../chunks/chunk-QEKI6WGQ.js";
|
|
21
21
|
import "../../../../chunks/chunk-HQLRJ7XW.js";
|
|
22
22
|
import "../../../../chunks/chunk-XCBH6NLF.js";
|
|
23
23
|
export {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import {
|
|
2
|
+
unknownToString
|
|
3
|
+
} from "../../../chunks/chunk-FENXVJYO.js";
|
|
1
4
|
import {
|
|
2
5
|
makeFailure,
|
|
3
6
|
makeSuccess
|
|
4
7
|
} from "../../../chunks/chunk-QEKI6WGQ.js";
|
|
5
|
-
import {
|
|
6
|
-
unknownToString
|
|
7
|
-
} from "../../../chunks/chunk-FENXVJYO.js";
|
|
8
8
|
import "../../../chunks/chunk-XCBH6NLF.js";
|
|
9
9
|
|
|
10
10
|
// src/agnostic/misc/assert/index.ts
|
|
@@ -1,16 +1,55 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
toError,
|
|
5
|
-
toNull,
|
|
6
|
-
toNumber,
|
|
7
|
-
toNumberArr,
|
|
8
|
-
toRecord,
|
|
9
|
-
toString
|
|
10
|
-
} from "../../../chunks/chunk-YWSXCFYY.js";
|
|
11
|
-
import "../../../chunks/chunk-QXAJXTXV.js";
|
|
2
|
+
isFalsy
|
|
3
|
+
} from "../../../chunks/chunk-QXAJXTXV.js";
|
|
12
4
|
import "../../../chunks/chunk-HC6ZOHCS.js";
|
|
13
5
|
import "../../../chunks/chunk-XCBH6NLF.js";
|
|
6
|
+
|
|
7
|
+
// src/agnostic/misc/cast/index.ts
|
|
8
|
+
function toBoolean(value) {
|
|
9
|
+
if (typeof value === "boolean") return value;
|
|
10
|
+
if (typeof value === "string") {
|
|
11
|
+
if (value.toLowerCase().trim() === "true") return true;
|
|
12
|
+
return false;
|
|
13
|
+
}
|
|
14
|
+
return !isFalsy(value);
|
|
15
|
+
}
|
|
16
|
+
function toNumber(value) {
|
|
17
|
+
if (typeof value === "number") return value;
|
|
18
|
+
if (typeof value === "string") return parseFloat(value);
|
|
19
|
+
return 0;
|
|
20
|
+
}
|
|
21
|
+
function toString(value) {
|
|
22
|
+
if (typeof value === "string") return value;
|
|
23
|
+
return String(value);
|
|
24
|
+
}
|
|
25
|
+
function toNull(_value) {
|
|
26
|
+
return null;
|
|
27
|
+
}
|
|
28
|
+
function toArray(value) {
|
|
29
|
+
if (Array.isArray(value)) return value;
|
|
30
|
+
if (typeof value === "object" && value !== null) return Object.entries(value);
|
|
31
|
+
return [value];
|
|
32
|
+
}
|
|
33
|
+
function toNumberArr(value) {
|
|
34
|
+
const arrValue = toArray(value);
|
|
35
|
+
return arrValue.map((val) => toNumber(val));
|
|
36
|
+
}
|
|
37
|
+
function toRecord(value) {
|
|
38
|
+
const record = {};
|
|
39
|
+
try {
|
|
40
|
+
Object.keys(value).forEach((key) => {
|
|
41
|
+
record[key] = value[key];
|
|
42
|
+
});
|
|
43
|
+
} catch (err) {
|
|
44
|
+
return record;
|
|
45
|
+
}
|
|
46
|
+
return record;
|
|
47
|
+
}
|
|
48
|
+
function toError(value) {
|
|
49
|
+
if (value instanceof Error) return value;
|
|
50
|
+
if (typeof value === "string") return new Error(value);
|
|
51
|
+
return new Error(toString(value));
|
|
52
|
+
}
|
|
14
53
|
export {
|
|
15
54
|
toArray,
|
|
16
55
|
toBoolean,
|
|
@@ -34,6 +34,7 @@ export type Logger = (ops: number, url: string, waitlist: string[], processed: S
|
|
|
34
34
|
* @template T - The type of content returned by the fetcher.
|
|
35
35
|
* @property {number} limit - Maximum number of URLs to process.
|
|
36
36
|
* @property {number | (() => number)} [delayMs] - Optional delay between processing URLs, in milliseconds, or a function returning the delay.
|
|
37
|
+
* @property {boolean} [allowDuplicates] - Optional, allows fetching and processing an URL that has already been seen
|
|
37
38
|
* @property {Fetcher<T>} fetcher - Function that fetches content for each URL.
|
|
38
39
|
* @property {Processor<T>} processor - Function that processes fetched content.
|
|
39
40
|
* @property {Logger} [logger] - Optional function for logging crawl progress.
|
|
@@ -41,6 +42,7 @@ export type Logger = (ops: number, url: string, waitlist: string[], processed: S
|
|
|
41
42
|
export type Options<T extends any> = {
|
|
42
43
|
limit: number;
|
|
43
44
|
delayMs?: number | (() => number);
|
|
45
|
+
allowDuplicates?: boolean;
|
|
44
46
|
fetcher: Fetcher<T>;
|
|
45
47
|
processor: Processor<T>;
|
|
46
48
|
logger?: Logger;
|
|
@@ -52,12 +54,12 @@ export type Options<T extends any> = {
|
|
|
52
54
|
* @param {Options<T>} options - Crawler configuration options.
|
|
53
55
|
* @returns {{
|
|
54
56
|
* crawl: (startUrl: string) => Promise<void>,
|
|
55
|
-
* push: (
|
|
57
|
+
* push: (...urls: string[]) => void,
|
|
56
58
|
* flush: () => void
|
|
57
59
|
* }} An object with methods to start crawling, enqueue URLs, and flush the waitlist.
|
|
58
60
|
*/
|
|
59
61
|
export declare function create<T extends any>(options: Options<T>): {
|
|
60
62
|
crawl: (startUrl: string) => Promise<void>;
|
|
61
|
-
push: (
|
|
63
|
+
push: (...urls: string[]) => void;
|
|
62
64
|
flush: () => void;
|
|
63
65
|
};
|
|
@@ -7,7 +7,7 @@ import "../../../chunks/chunk-XCBH6NLF.js";
|
|
|
7
7
|
function create(options) {
|
|
8
8
|
let ops = 0;
|
|
9
9
|
const waitlist = [];
|
|
10
|
-
const push = (
|
|
10
|
+
const push = (...urls) => waitlist.push(...urls);
|
|
11
11
|
const flush = () => {
|
|
12
12
|
waitlist.length = 0;
|
|
13
13
|
};
|
|
@@ -18,7 +18,7 @@ function create(options) {
|
|
|
18
18
|
ops++;
|
|
19
19
|
const currentUrl = waitlist[0];
|
|
20
20
|
if (options.logger !== void 0) options.logger(ops, currentUrl, waitlist, processed);
|
|
21
|
-
if (!processed.has(currentUrl)) {
|
|
21
|
+
if (!processed.has(currentUrl) || options.allowDuplicates === true) {
|
|
22
22
|
const content = await options.fetcher(currentUrl);
|
|
23
23
|
await options.processor(currentUrl, content, { push, flush });
|
|
24
24
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Computes the value at a specific level in a geometric progression
|
|
3
|
+
* between a minimum and maximum over a given number of steps.
|
|
4
|
+
*
|
|
5
|
+
* This function divides the range [min, max] multiplicatively (logarithmically)
|
|
6
|
+
* across `steps` and returns the value corresponding to `level` (1-based).
|
|
7
|
+
*
|
|
8
|
+
* @param {number} min - The minimum value (must be non-zero).
|
|
9
|
+
* @param {number} max - The maximum value.
|
|
10
|
+
* @param {number} level - The current level (1-based, typically 1 ≤ level ≤ steps).
|
|
11
|
+
* @param {number} steps - Total number of steps (must be ≥ 1).
|
|
12
|
+
* @returns {number} The computed value at the specified level, or `NaN` if input is invalid.
|
|
13
|
+
*/
|
|
14
|
+
export declare function getGeometricStep(min: number, max: number, level: number, steps: number): number;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Returns a shallow copy of an object including values from its getter properties.
|
|
3
3
|
*
|
|
4
|
-
* @param {
|
|
4
|
+
* @param {object} obj - The object to flatten.
|
|
5
5
|
* @returns {Record<string, unknown>} A new object containing all own properties and evaluated getter values.
|
|
6
6
|
*/
|
|
7
|
-
export declare function flattenGetters(obj:
|
|
7
|
+
export declare function flattenGetters(obj: object): Record<string, unknown>;
|
|
@@ -1,24 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
toRecord
|
|
3
|
-
} from "../../../chunks/chunk-YWSXCFYY.js";
|
|
4
|
-
import "../../../chunks/chunk-QXAJXTXV.js";
|
|
5
|
-
import "../../../chunks/chunk-HC6ZOHCS.js";
|
|
6
1
|
import "../../../chunks/chunk-XCBH6NLF.js";
|
|
7
2
|
|
|
8
3
|
// src/agnostic/objects/flatten-getters/index.ts
|
|
9
4
|
function flattenGetters(obj) {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
return returned;
|
|
19
|
-
} catch (err) {
|
|
20
|
-
return {};
|
|
21
|
-
}
|
|
5
|
+
const getters = Object.entries(
|
|
6
|
+
Object.getOwnPropertyDescriptors(obj)
|
|
7
|
+
).filter(([_, desc]) => typeof desc.get === "function").map(([key]) => key);
|
|
8
|
+
const returned = { ...obj };
|
|
9
|
+
getters.forEach((getter) => {
|
|
10
|
+
returned[getter] = obj[getter];
|
|
11
|
+
});
|
|
12
|
+
return returned;
|
|
22
13
|
}
|
|
23
14
|
export {
|
|
24
15
|
flattenGetters
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,38 +1,37 @@
|
|
|
1
|
+
import type { UnwrapPromise } from '../../typescript/types.js';
|
|
1
2
|
/**
|
|
2
|
-
* A
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
*
|
|
7
|
-
|
|
8
|
-
export type InputValue<Input extends {}, Key extends FormatKey<Input>> = Input extends Record<Key, infer V> ? V : undefined;
|
|
9
|
-
/**
|
|
10
|
-
* A function that transforms a value of type I into type O, can return a Promise.
|
|
3
|
+
* A function that transforms a value of a specific type into another type, can return a Promise.
|
|
4
|
+
*
|
|
5
|
+
* @template InputType - The type of the input value the formatter receives.
|
|
6
|
+
* @template OutputType - The type of the value the formatter returns (or resolves to if Promise).
|
|
7
|
+
* @param {InputType} val - The input value to transform.
|
|
8
|
+
* @returns {OutputType | Promise<OutputType>} The transformed value or a Promise resolving to it.
|
|
11
9
|
*/
|
|
12
|
-
export type FormatterFunc<
|
|
10
|
+
export type FormatterFunc<InputType, OutputType> = (val: InputType) => OutputType | Promise<OutputType>;
|
|
13
11
|
/**
|
|
14
|
-
* An object mapping keys to formatter functions.
|
|
12
|
+
* An object mapping keys of an input object to formatter functions.
|
|
13
|
+
* Each formatter receives the value corresponding to its key from the input object.
|
|
14
|
+
*
|
|
15
|
+
* @template InputObject - The type of the input object being formatted.
|
|
15
16
|
*/
|
|
16
|
-
export type Format<
|
|
17
|
-
[Key in
|
|
17
|
+
export type Format<InputObject extends Record<PropertyKey, any>> = {
|
|
18
|
+
[Key in keyof InputObject]?: FormatterFunc<InputObject[Key], any>;
|
|
18
19
|
};
|
|
19
20
|
/**
|
|
20
|
-
*
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* The object type resulting from applying all formatters and unwrapping any Promises.
|
|
21
|
+
* The resulting object after applying all formatters and unwrapping any returned Promises.
|
|
22
|
+
*
|
|
23
|
+
* @template FormatObject - The type of the format object mapping keys to formatter functions.
|
|
25
24
|
*/
|
|
26
|
-
export type Formatted<
|
|
27
|
-
[Key in keyof
|
|
25
|
+
export type Formatted<FormatObject> = {
|
|
26
|
+
[Key in keyof FormatObject]: FormatObject[Key] extends FormatterFunc<any, any> ? UnwrapPromise<ReturnType<FormatObject[Key]>> : never;
|
|
28
27
|
};
|
|
29
28
|
/**
|
|
30
29
|
* Applies a set of formatter functions to the corresponding properties of an input object.
|
|
31
30
|
*
|
|
32
|
-
* @template
|
|
33
|
-
* @template
|
|
34
|
-
* @param {
|
|
35
|
-
* @param {
|
|
36
|
-
* @returns {Promise<Formatted<
|
|
31
|
+
* @template InputObject - The type of the input object.
|
|
32
|
+
* @template FormatObject - The type of the format object mapping keys to formatter functions.
|
|
33
|
+
* @param {InputObject} input - The object whose properties are to be formatted.
|
|
34
|
+
* @param {FormatObject} format - An object containing formatter functions for each key.
|
|
35
|
+
* @returns {Promise<Formatted<FormatObject>>} A Promise resolving to the formatted object with all promises unwrapped.
|
|
37
36
|
*/
|
|
38
|
-
export declare function recordFormat<
|
|
37
|
+
export declare function recordFormat<InputObject extends Record<PropertyKey, any>, FormatObject extends Format<InputObject>>(input: InputObject, format: FormatObject): Promise<Formatted<FormatObject>>;
|
|
@@ -5,11 +5,7 @@ async function recordFormat(input, format) {
|
|
|
5
5
|
const result = {};
|
|
6
6
|
for (const key in format) {
|
|
7
7
|
const formatter = format[key];
|
|
8
|
-
|
|
9
|
-
result[key] = await formatter(input[key]);
|
|
10
|
-
} else {
|
|
11
|
-
result[key] = formatter;
|
|
12
|
-
}
|
|
8
|
+
result[key] = await formatter(input[key]);
|
|
13
9
|
}
|
|
14
10
|
return result;
|
|
15
11
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
* Maps the values of a record using a provided mapper function, returning a new record with the same keys.
|
|
3
3
|
*
|
|
4
4
|
* @template Input - The type of the input record.
|
|
5
|
-
* @template
|
|
5
|
+
* @template MappedValue - The type of the mapped values.
|
|
6
6
|
* @param {Input} record - The record whose values will be mapped.
|
|
7
|
-
* @param {(value: Input[keyof Input], key: keyof Input) =>
|
|
8
|
-
* @returns {{ [K in keyof Input]:
|
|
7
|
+
* @param {(value: Input[keyof Input], key: keyof Input) => MappedValue} mapper - Function to transform each value.
|
|
8
|
+
* @returns {{ [K in keyof Input]: MappedValue }} A new record with the same keys and mapped values.
|
|
9
9
|
*/
|
|
10
|
-
export declare function recordMap<Input extends Record<string, any>,
|
|
11
|
-
[K in keyof Input]:
|
|
10
|
+
export declare function recordMap<Input extends Record<string, any>, MappedValue>(record: Input, mapper: (value: Input[keyof Input], key: keyof Input) => MappedValue): {
|
|
11
|
+
[K in keyof Input]: MappedValue;
|
|
12
12
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -61,7 +61,7 @@ function debounce(toDebounceFunc, delayMs) {
|
|
|
61
61
|
let lastReturnValue = void 0;
|
|
62
62
|
let nextExecutionTimeout = null;
|
|
63
63
|
function scheduleNextCall() {
|
|
64
|
-
if (
|
|
64
|
+
if (nextExecutionTimeout !== null) {
|
|
65
65
|
clearTimeout(nextExecutionTimeout);
|
|
66
66
|
nextExecutionTimeout = null;
|
|
67
67
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -42,7 +42,7 @@ export declare function fromStartToEnd(regexp: RegExp, flags?: string): RegExp;
|
|
|
42
42
|
*
|
|
43
43
|
* @param string - The string to test.
|
|
44
44
|
* @param regexp - The regular expression pattern.
|
|
45
|
-
* @param [returnMatches=
|
|
45
|
+
* @param [returnMatches=false] - If true, returns matches; otherwise, returns boolean.
|
|
46
46
|
* @param [flags='g'] - Optional flags.
|
|
47
47
|
* @returns {boolean | RegExpMatchArray | null} Boolean or match array based on `returnMatches`.
|
|
48
48
|
*/
|
|
@@ -56,7 +56,7 @@ export declare function stringStartsWith(string: string, regexp: RegExp, returnM
|
|
|
56
56
|
*
|
|
57
57
|
* @param string - The string to test.
|
|
58
58
|
* @param regexp - The regular expression pattern.
|
|
59
|
-
* @param [returnMatches=
|
|
59
|
+
* @param [returnMatches=false] - If true, returns matches; otherwise, returns boolean.
|
|
60
60
|
* @param [flags='g'] - Optional flags.
|
|
61
61
|
* @returns {boolean | RegExpMatchArray | null} Boolean or match array based on `returnMatches`.
|
|
62
62
|
*/
|
|
@@ -88,6 +88,9 @@ export declare function stringIs(string: string, regexp: RegExp, returnMatches:
|
|
|
88
88
|
export declare function fromStrings(strings: string[]): RegExp;
|
|
89
89
|
/**
|
|
90
90
|
* Escapes special RegExp characters in a string.
|
|
91
|
+
* - Newlines are turned into `\\n`
|
|
92
|
+
* - Other whitespace characters are normalized to `\\s`
|
|
93
|
+
* - RegExp special characters (including backslash) are escaped
|
|
91
94
|
*
|
|
92
95
|
* @param {string} string - String to escape.
|
|
93
96
|
* @returns {string} Escaped string.
|