@design-edito/tools 0.5.14 → 0.5.15
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/index.d.ts +2 -2
- package/agnostic/arrays/index.js +2 -2
- package/agnostic/colors/index.d.ts +1 -1
- package/agnostic/colors/index.js +1 -1
- package/agnostic/css/index.d.ts +2 -2
- package/agnostic/css/index.js +2 -2
- package/agnostic/errors/index.d.ts +1 -1
- package/agnostic/errors/index.js +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/index.d.ts +12 -12
- package/agnostic/html/hyper-json/smart-tags/coalesced/index.js +12 -12
- package/agnostic/html/hyper-json/smart-tags/isolated/index.d.ts +4 -4
- package/agnostic/html/hyper-json/smart-tags/isolated/index.js +4 -4
- package/agnostic/html/index.d.ts +1 -1
- package/agnostic/html/index.js +1 -1
- package/agnostic/index.d.ts +2 -2
- package/agnostic/index.js +2 -2
- package/agnostic/misc/index.d.ts +5 -5
- package/agnostic/misc/index.js +5 -5
- package/agnostic/numbers/index.d.ts +1 -1
- package/agnostic/numbers/index.js +1 -1
- package/agnostic/objects/index.d.ts +1 -1
- package/agnostic/objects/index.js +1 -1
- package/agnostic/optim/index.d.ts +1 -1
- package/agnostic/optim/index.js +1 -1
- package/agnostic/random/index.d.ts +1 -1
- package/agnostic/random/index.js +1 -1
- package/agnostic/strings/index.d.ts +3 -3
- package/agnostic/strings/index.js +3 -3
- package/agnostic/subtitles/index.d.ts +1 -1
- package/agnostic/subtitles/index.js +1 -1
- package/agnostic/time/dates/format-date/index.d.ts +19 -4
- package/agnostic/time/dates/format-date/index.js +24 -7
- package/agnostic/time/dates/format-date/index.test.js +20 -7
- package/agnostic/time/dates/format-date/parts.js +4 -4
- package/agnostic/time/dates/format-date/types.d.ts +9 -9
- package/agnostic/time/duration/format-duration/index.d.ts +18 -1
- package/agnostic/time/duration/format-duration/index.js +44 -7
- package/agnostic/time/duration/format-duration/index.test.js +27 -0
- package/agnostic/time/duration/format-duration/types.d.ts +21 -1
- package/agnostic/time/index.d.ts +2 -2
- package/agnostic/time/index.js +2 -2
- package/components/Video/index.controlled.d.ts +7 -2
- package/components/Video/index.controlled.js +3 -2
- package/components/Video/utils.d.ts +0 -31
- package/components/Video/utils.js +0 -58
- package/components/index.d.ts +2 -2
- package/components/index.js +2 -2
- package/node/@aws-s3/storage/directory/index.d.ts +1 -1
- package/node/@aws-s3/storage/directory/index.js +1 -1
- package/node/@aws-s3/storage/file/index.d.ts +2 -2
- package/node/@aws-s3/storage/file/index.js +2 -2
- package/node/@aws-s3/storage/index.d.ts +1 -1
- package/node/@aws-s3/storage/index.js +1 -1
- package/node/@google-cloud/storage/file/index.d.ts +3 -3
- package/node/@google-cloud/storage/file/index.js +3 -3
- package/node/cloud-storage/operations/index.d.ts +3 -3
- package/node/cloud-storage/operations/index.js +3 -3
- package/node/encryption/@aes-256-gcm/index.d.ts +1 -1
- package/node/encryption/@aes-256-gcm/index.js +1 -1
- package/node/files/index.d.ts +1 -1
- package/node/files/index.js +1 -1
- package/node/ftps/directory/index.d.ts +1 -1
- package/node/ftps/directory/index.js +1 -1
- package/node/ftps/file/index.d.ts +2 -2
- package/node/ftps/file/index.js +2 -2
- package/node/images/transform/operations/index.d.ts +4 -4
- package/node/images/transform/operations/index.js +4 -4
- package/node/index.d.ts +1 -1
- package/node/index.js +1 -1
- package/node/process/index.d.ts +1 -1
- package/node/process/index.js +1 -1
- package/node/sftp/directory/index.d.ts +1 -1
- package/node/sftp/directory/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
export * as dedupe from './dedupe/index.js'
|
|
1
2
|
export * as findDuplicates from './find-duplicates/index.js'
|
|
2
3
|
export * as isArrayOf from './is-array-of/index.js'
|
|
3
|
-
export * as dedupe from './dedupe/index.js'
|
|
4
4
|
export * as make from './make/index.js'
|
|
5
|
-
export * as shuffle from './shuffle/index.js'
|
|
6
5
|
export * as randomPick from './random-pick/index.js'
|
|
6
|
+
export * as shuffle from './shuffle/index.js'
|
package/agnostic/arrays/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
export * as dedupe from './dedupe/index.js'
|
|
1
2
|
export * as findDuplicates from './find-duplicates/index.js'
|
|
2
3
|
export * as isArrayOf from './is-array-of/index.js'
|
|
3
|
-
export * as dedupe from './dedupe/index.js'
|
|
4
4
|
export * as make from './make/index.js'
|
|
5
|
-
export * as shuffle from './shuffle/index.js'
|
|
6
5
|
export * as randomPick from './random-pick/index.js'
|
|
6
|
+
export * as shuffle from './shuffle/index.js'
|
|
@@ -7,6 +7,6 @@ export * as invert from './invert/index.js'
|
|
|
7
7
|
export * as lerp from './lerp/index.js'
|
|
8
8
|
export * as luminance from './luminance/index.js'
|
|
9
9
|
export * as palette from './palette/index.js'
|
|
10
|
+
export * as tidy from './tidy/index.js'
|
|
10
11
|
export * as rotate from './rotate/index.js'
|
|
11
12
|
export * as typechecks from './typechecks/index.js'
|
|
12
|
-
export * as tidy from './tidy/index.js'
|
package/agnostic/colors/index.js
CHANGED
|
@@ -7,6 +7,6 @@ export * as invert from './invert/index.js'
|
|
|
7
7
|
export * as lerp from './lerp/index.js'
|
|
8
8
|
export * as luminance from './luminance/index.js'
|
|
9
9
|
export * as palette from './palette/index.js'
|
|
10
|
+
export * as tidy from './tidy/index.js'
|
|
10
11
|
export * as rotate from './rotate/index.js'
|
|
11
12
|
export * as typechecks from './typechecks/index.js'
|
|
12
|
-
export * as tidy from './tidy/index.js'
|
package/agnostic/css/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * as bem from './bem/index.js'
|
|
2
1
|
export * as clss from './clss/index.js'
|
|
2
|
+
export * as bem from './bem/index.js'
|
|
3
|
+
export * as isValidCssClassName from './is-valid-css-class-name/index.js'
|
|
3
4
|
export * as generateNiceColor from './generate-nice-color/index.js'
|
|
4
5
|
export * as scale from './scale/index.js'
|
|
5
6
|
export * as stylesSet from './styles-set/index.js'
|
|
6
|
-
export * as isValidCssClassName from './is-valid-css-class-name/index.js'
|
package/agnostic/css/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * as bem from './bem/index.js'
|
|
2
1
|
export * as clss from './clss/index.js'
|
|
2
|
+
export * as bem from './bem/index.js'
|
|
3
|
+
export * as isValidCssClassName from './is-valid-css-class-name/index.js'
|
|
3
4
|
export * as generateNiceColor from './generate-nice-color/index.js'
|
|
4
5
|
export * as scale from './scale/index.js'
|
|
5
6
|
export * as stylesSet from './styles-set/index.js'
|
|
6
|
-
export * as isValidCssClassName from './is-valid-css-class-name/index.js'
|
package/agnostic/errors/index.js
CHANGED
|
@@ -1,52 +1,52 @@
|
|
|
1
1
|
export * as add from './add/index.js'
|
|
2
2
|
export * as addclass from './addclass/index.js'
|
|
3
3
|
export * as and from './and/index.js'
|
|
4
|
+
export * as call from './call/index.js'
|
|
4
5
|
export * as append from './append/index.js'
|
|
5
6
|
export * as at from './at/index.js'
|
|
6
|
-
export * as call from './call/index.js'
|
|
7
7
|
export * as clone from './clone/index.js'
|
|
8
8
|
export * as deleteproperties from './deleteproperties/index.js'
|
|
9
9
|
export * as equals from './equals/index.js'
|
|
10
10
|
export * as getattribute from './getattribute/index.js'
|
|
11
|
-
export * as getproperty from './getproperty/index.js'
|
|
12
11
|
export * as getproperties from './getproperties/index.js'
|
|
13
12
|
export * as hjparse from './hjparse/index.js'
|
|
14
13
|
export * as hjstringify from './hjstringify/index.js'
|
|
14
|
+
export * as getproperty from './getproperty/index.js'
|
|
15
15
|
export * as if from './if/index.js'
|
|
16
16
|
export * as initialize from './initialize/index.js'
|
|
17
17
|
export * as join from './join/index.js'
|
|
18
|
-
export * as length from './length/index.js'
|
|
19
18
|
export * as map from './map/index.js'
|
|
19
|
+
export * as length from './length/index.js'
|
|
20
20
|
export * as negate from './negate/index.js'
|
|
21
21
|
export * as notrailing from './notrailing/index.js'
|
|
22
22
|
export * as or from './or/index.js'
|
|
23
23
|
export * as pickrandom from './pickrandom/index.js'
|
|
24
24
|
export * as populate from './populate/index.js'
|
|
25
|
-
export * as push from './push/index.js'
|
|
26
25
|
export * as print from './print/index.js'
|
|
26
|
+
export * as push from './push/index.js'
|
|
27
27
|
export * as pusheach from './pusheach/index.js'
|
|
28
28
|
export * as recordtoarray from './recordtoarray/index.js'
|
|
29
29
|
export * as removeattribute from './removeattribute/index.js'
|
|
30
|
-
export * as removeclass from './removeclass/index.js'
|
|
31
30
|
export * as renameproperty from './renameproperty/index.js'
|
|
32
31
|
export * as replace from './replace/index.js'
|
|
33
|
-
export * as
|
|
32
|
+
export * as removeclass from './removeclass/index.js'
|
|
34
33
|
export * as select from './select/index.js'
|
|
34
|
+
export * as set from './set/index.js'
|
|
35
35
|
export * as setattribute from './setattribute/index.js'
|
|
36
|
+
export * as sorton from './sorton/index.js'
|
|
36
37
|
export * as setproperty from './setproperty/index.js'
|
|
37
38
|
export * as split from './split/index.js'
|
|
38
39
|
export * as spread from './spread/index.js'
|
|
39
40
|
export * as toarray from './toarray/index.js'
|
|
40
41
|
export * as toboolean from './toboolean/index.js'
|
|
41
|
-
export * as toggleclass from './toggleclass/index.js'
|
|
42
42
|
export * as toelement from './toelement/index.js'
|
|
43
|
+
export * as toggleclass from './toggleclass/index.js'
|
|
43
44
|
export * as tonodelist from './tonodelist/index.js'
|
|
44
|
-
export * as tonumber from './tonumber/index.js'
|
|
45
|
-
export * as sorton from './sorton/index.js'
|
|
46
45
|
export * as tonull from './tonull/index.js'
|
|
46
|
+
export * as tonumber from './tonumber/index.js'
|
|
47
|
+
export * as torecord from './torecord/index.js'
|
|
47
48
|
export * as toref from './toref/index.js'
|
|
48
|
-
export * as tostring from './tostring/index.js'
|
|
49
|
-
export * as transformselected from './transformselected/index.js'
|
|
50
49
|
export * as totext from './totext/index.js'
|
|
50
|
+
export * as tostring from './tostring/index.js'
|
|
51
51
|
export * as trim from './trim/index.js'
|
|
52
|
-
export * as
|
|
52
|
+
export * as transformselected from './transformselected/index.js'
|
|
@@ -1,52 +1,52 @@
|
|
|
1
1
|
export * as add from './add/index.js'
|
|
2
2
|
export * as addclass from './addclass/index.js'
|
|
3
3
|
export * as and from './and/index.js'
|
|
4
|
+
export * as call from './call/index.js'
|
|
4
5
|
export * as append from './append/index.js'
|
|
5
6
|
export * as at from './at/index.js'
|
|
6
|
-
export * as call from './call/index.js'
|
|
7
7
|
export * as clone from './clone/index.js'
|
|
8
8
|
export * as deleteproperties from './deleteproperties/index.js'
|
|
9
9
|
export * as equals from './equals/index.js'
|
|
10
10
|
export * as getattribute from './getattribute/index.js'
|
|
11
|
-
export * as getproperty from './getproperty/index.js'
|
|
12
11
|
export * as getproperties from './getproperties/index.js'
|
|
13
12
|
export * as hjparse from './hjparse/index.js'
|
|
14
13
|
export * as hjstringify from './hjstringify/index.js'
|
|
14
|
+
export * as getproperty from './getproperty/index.js'
|
|
15
15
|
export * as if from './if/index.js'
|
|
16
16
|
export * as initialize from './initialize/index.js'
|
|
17
17
|
export * as join from './join/index.js'
|
|
18
|
-
export * as length from './length/index.js'
|
|
19
18
|
export * as map from './map/index.js'
|
|
19
|
+
export * as length from './length/index.js'
|
|
20
20
|
export * as negate from './negate/index.js'
|
|
21
21
|
export * as notrailing from './notrailing/index.js'
|
|
22
22
|
export * as or from './or/index.js'
|
|
23
23
|
export * as pickrandom from './pickrandom/index.js'
|
|
24
24
|
export * as populate from './populate/index.js'
|
|
25
|
-
export * as push from './push/index.js'
|
|
26
25
|
export * as print from './print/index.js'
|
|
26
|
+
export * as push from './push/index.js'
|
|
27
27
|
export * as pusheach from './pusheach/index.js'
|
|
28
28
|
export * as recordtoarray from './recordtoarray/index.js'
|
|
29
29
|
export * as removeattribute from './removeattribute/index.js'
|
|
30
|
-
export * as removeclass from './removeclass/index.js'
|
|
31
30
|
export * as renameproperty from './renameproperty/index.js'
|
|
32
31
|
export * as replace from './replace/index.js'
|
|
33
|
-
export * as
|
|
32
|
+
export * as removeclass from './removeclass/index.js'
|
|
34
33
|
export * as select from './select/index.js'
|
|
34
|
+
export * as set from './set/index.js'
|
|
35
35
|
export * as setattribute from './setattribute/index.js'
|
|
36
|
+
export * as sorton from './sorton/index.js'
|
|
36
37
|
export * as setproperty from './setproperty/index.js'
|
|
37
38
|
export * as split from './split/index.js'
|
|
38
39
|
export * as spread from './spread/index.js'
|
|
39
40
|
export * as toarray from './toarray/index.js'
|
|
40
41
|
export * as toboolean from './toboolean/index.js'
|
|
41
|
-
export * as toggleclass from './toggleclass/index.js'
|
|
42
42
|
export * as toelement from './toelement/index.js'
|
|
43
|
+
export * as toggleclass from './toggleclass/index.js'
|
|
43
44
|
export * as tonodelist from './tonodelist/index.js'
|
|
44
|
-
export * as tonumber from './tonumber/index.js'
|
|
45
|
-
export * as sorton from './sorton/index.js'
|
|
46
45
|
export * as tonull from './tonull/index.js'
|
|
46
|
+
export * as tonumber from './tonumber/index.js'
|
|
47
|
+
export * as torecord from './torecord/index.js'
|
|
47
48
|
export * as toref from './toref/index.js'
|
|
48
|
-
export * as tostring from './tostring/index.js'
|
|
49
|
-
export * as transformselected from './transformselected/index.js'
|
|
50
49
|
export * as totext from './totext/index.js'
|
|
50
|
+
export * as tostring from './tostring/index.js'
|
|
51
51
|
export * as trim from './trim/index.js'
|
|
52
|
-
export * as
|
|
52
|
+
export * as transformselected from './transformselected/index.js'
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export * as any from './any/index.js'
|
|
2
1
|
export * as array from './array/index.js'
|
|
3
2
|
export * as boolean from './boolean/index.js'
|
|
4
|
-
export * as
|
|
5
|
-
export * as get from './get/index.js'
|
|
3
|
+
export * as any from './any/index.js'
|
|
6
4
|
export * as element from './element/index.js'
|
|
5
|
+
export * as get from './get/index.js'
|
|
7
6
|
export * as nodelist from './nodelist/index.js'
|
|
8
|
-
export * as
|
|
7
|
+
export * as guess from './guess/index.js'
|
|
9
8
|
export * as null from './null/index.js'
|
|
9
|
+
export * as number from './number/index.js'
|
|
10
10
|
export * as record from './record/index.js'
|
|
11
11
|
export * as ref from './ref/index.js'
|
|
12
12
|
export * as string from './string/index.js'
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export * as any from './any/index.js'
|
|
2
1
|
export * as array from './array/index.js'
|
|
3
2
|
export * as boolean from './boolean/index.js'
|
|
4
|
-
export * as
|
|
5
|
-
export * as get from './get/index.js'
|
|
3
|
+
export * as any from './any/index.js'
|
|
6
4
|
export * as element from './element/index.js'
|
|
5
|
+
export * as get from './get/index.js'
|
|
7
6
|
export * as nodelist from './nodelist/index.js'
|
|
8
|
-
export * as
|
|
7
|
+
export * as guess from './guess/index.js'
|
|
9
8
|
export * as null from './null/index.js'
|
|
9
|
+
export * as number from './number/index.js'
|
|
10
10
|
export * as record from './record/index.js'
|
|
11
11
|
export * as ref from './ref/index.js'
|
|
12
12
|
export * as string from './string/index.js'
|
package/agnostic/html/index.d.ts
CHANGED
|
@@ -5,6 +5,6 @@ export * as hyperJson from './hyper-json/index.js'
|
|
|
5
5
|
export * as insertNode from './insert-node/index.js'
|
|
6
6
|
export * as placeholders from './placeholders/index.js'
|
|
7
7
|
export * as replaceInElement from './replace-in-element/index.js'
|
|
8
|
+
export * as watchSelection from './watch-selection/index.js'
|
|
8
9
|
export * as stringToNodes from './string-to-nodes/index.js'
|
|
9
10
|
export * as selectorToElement from './selector-to-element/index.js'
|
|
10
|
-
export * as watchSelection from './watch-selection/index.js'
|
package/agnostic/html/index.js
CHANGED
|
@@ -5,6 +5,6 @@ export * as hyperJson from './hyper-json/index.js'
|
|
|
5
5
|
export * as insertNode from './insert-node/index.js'
|
|
6
6
|
export * as placeholders from './placeholders/index.js'
|
|
7
7
|
export * as replaceInElement from './replace-in-element/index.js'
|
|
8
|
+
export * as watchSelection from './watch-selection/index.js'
|
|
8
9
|
export * as stringToNodes from './string-to-nodes/index.js'
|
|
9
10
|
export * as selectorToElement from './selector-to-element/index.js'
|
|
10
|
-
export * as watchSelection from './watch-selection/index.js'
|
package/agnostic/index.d.ts
CHANGED
|
@@ -2,7 +2,6 @@ export * as arrays from './arrays/index.js'
|
|
|
2
2
|
export * as booleans from './booleans/index.js'
|
|
3
3
|
export * as colors from './colors/index.js'
|
|
4
4
|
export * as css from './css/index.js'
|
|
5
|
-
export * as html from './html/index.js'
|
|
6
5
|
export * as errors from './errors/index.js'
|
|
7
6
|
export * as misc from './misc/index.js'
|
|
8
7
|
export * as numbers from './numbers/index.js'
|
|
@@ -11,7 +10,8 @@ export * as optim from './optim/index.js'
|
|
|
11
10
|
export * as random from './random/index.js'
|
|
12
11
|
export * as regexps from './regexps/index.js'
|
|
13
12
|
export * as sanitization from './sanitization/index.js'
|
|
13
|
+
export * as html from './html/index.js'
|
|
14
14
|
export * as strings from './strings/index.js'
|
|
15
|
-
export * as time from './time/index.js'
|
|
16
15
|
export * as subtitles from './subtitles/index.js'
|
|
16
|
+
export * as time from './time/index.js'
|
|
17
17
|
export * as typescript from './typescript/index.js'
|
package/agnostic/index.js
CHANGED
|
@@ -2,7 +2,6 @@ export * as arrays from './arrays/index.js'
|
|
|
2
2
|
export * as booleans from './booleans/index.js'
|
|
3
3
|
export * as colors from './colors/index.js'
|
|
4
4
|
export * as css from './css/index.js'
|
|
5
|
-
export * as html from './html/index.js'
|
|
6
5
|
export * as errors from './errors/index.js'
|
|
7
6
|
export * as misc from './misc/index.js'
|
|
8
7
|
export * as numbers from './numbers/index.js'
|
|
@@ -11,7 +10,8 @@ export * as optim from './optim/index.js'
|
|
|
11
10
|
export * as random from './random/index.js'
|
|
12
11
|
export * as regexps from './regexps/index.js'
|
|
13
12
|
export * as sanitization from './sanitization/index.js'
|
|
13
|
+
export * as html from './html/index.js'
|
|
14
14
|
export * as strings from './strings/index.js'
|
|
15
|
-
export * as time from './time/index.js'
|
|
16
15
|
export * as subtitles from './subtitles/index.js'
|
|
16
|
+
export * as time from './time/index.js'
|
|
17
17
|
export * as typescript from './typescript/index.js'
|
package/agnostic/misc/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
+
export * as assert from './assert/index.js'
|
|
1
2
|
export * as cast from './cast/index.js'
|
|
2
|
-
export * as connection from './connection/index.js'
|
|
3
3
|
export * as crawler from './crawler/index.js'
|
|
4
|
-
export * as
|
|
4
|
+
export * as crossenv from './crossenv/index.js'
|
|
5
|
+
export * as connection from './connection/index.js'
|
|
5
6
|
export * as dataSize from './data-size/index.js'
|
|
6
7
|
export * as isNullish from './is-nullish/index.js'
|
|
7
|
-
export * as crossenv from './crossenv/index.js'
|
|
8
|
-
export * as isConstructorFunction from './is-constructor-function/index.js'
|
|
9
8
|
export * as logs from './logs/index.js'
|
|
10
|
-
export * as
|
|
9
|
+
export * as isConstructorFunction from './is-constructor-function/index.js'
|
|
11
10
|
export * as normalizeExtension from './normalize-extension/index.js'
|
|
11
|
+
export * as loremIpsum from './lorem-ipsum/index.js'
|
|
12
12
|
export * as outcome from './outcome/index.js'
|
package/agnostic/misc/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
+
export * as assert from './assert/index.js'
|
|
1
2
|
export * as cast from './cast/index.js'
|
|
2
|
-
export * as connection from './connection/index.js'
|
|
3
3
|
export * as crawler from './crawler/index.js'
|
|
4
|
-
export * as
|
|
4
|
+
export * as crossenv from './crossenv/index.js'
|
|
5
|
+
export * as connection from './connection/index.js'
|
|
5
6
|
export * as dataSize from './data-size/index.js'
|
|
6
7
|
export * as isNullish from './is-nullish/index.js'
|
|
7
|
-
export * as crossenv from './crossenv/index.js'
|
|
8
|
-
export * as isConstructorFunction from './is-constructor-function/index.js'
|
|
9
8
|
export * as logs from './logs/index.js'
|
|
10
|
-
export * as
|
|
9
|
+
export * as isConstructorFunction from './is-constructor-function/index.js'
|
|
11
10
|
export * as normalizeExtension from './normalize-extension/index.js'
|
|
11
|
+
export * as loremIpsum from './lorem-ipsum/index.js'
|
|
12
12
|
export * as outcome from './outcome/index.js'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * as absoluteModulo from './absolute-modulo/index.js'
|
|
2
1
|
export * as clamp from './clamp/index.js'
|
|
3
2
|
export * as approximateRational from './approximate-rational/index.js'
|
|
4
3
|
export * as geometricProgressions from './geometric-progressions/index.js'
|
|
5
4
|
export * as round from './round/index.js'
|
|
6
5
|
export * as interpolate from './interpolate/index.js'
|
|
6
|
+
export * as absoluteModulo from './absolute-modulo/index.js'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * as absoluteModulo from './absolute-modulo/index.js'
|
|
2
1
|
export * as clamp from './clamp/index.js'
|
|
3
2
|
export * as approximateRational from './approximate-rational/index.js'
|
|
4
3
|
export * as geometricProgressions from './geometric-progressions/index.js'
|
|
5
4
|
export * as round from './round/index.js'
|
|
6
5
|
export * as interpolate from './interpolate/index.js'
|
|
6
|
+
export * as absoluteModulo from './absolute-modulo/index.js'
|
|
@@ -3,7 +3,7 @@ export * as enums from './enums/index.js'
|
|
|
3
3
|
export * as flattenGetters from './flatten-getters/index.js'
|
|
4
4
|
export * as isObject from './is-object/index.js'
|
|
5
5
|
export * as recordFormat from './record-format/index.js'
|
|
6
|
+
export * as isRecord from './is-record/index.js'
|
|
6
7
|
export * as recordMap from './record-map/index.js'
|
|
7
8
|
export * as sortKeys from './sort-keys/index.js'
|
|
8
9
|
export * as validation from './validation/index.js'
|
|
9
|
-
export * as isRecord from './is-record/index.js'
|
|
@@ -3,7 +3,7 @@ export * as enums from './enums/index.js'
|
|
|
3
3
|
export * as flattenGetters from './flatten-getters/index.js'
|
|
4
4
|
export * as isObject from './is-object/index.js'
|
|
5
5
|
export * as recordFormat from './record-format/index.js'
|
|
6
|
+
export * as isRecord from './is-record/index.js'
|
|
6
7
|
export * as recordMap from './record-map/index.js'
|
|
7
8
|
export * as sortKeys from './sort-keys/index.js'
|
|
8
9
|
export * as validation from './validation/index.js'
|
|
9
|
-
export * as isRecord from './is-record/index.js'
|
package/agnostic/optim/index.js
CHANGED
package/agnostic/random/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export * as charCodes from './char-codes/index.js'
|
|
2
1
|
export * as matches from './matches/index.js'
|
|
3
|
-
export * as
|
|
2
|
+
export * as charCodes from './char-codes/index.js'
|
|
4
3
|
export * as parseTable from './parse-table/index.js'
|
|
4
|
+
export * as normalizeIndent from './normalize-indent/index.js'
|
|
5
5
|
export * as replaceAll from './replace-all/index.js'
|
|
6
6
|
export * as toAlphanum from './to-alphanum/index.js'
|
|
7
|
-
export * as splitTrim from './split-trim/index.js'
|
|
8
7
|
export * as trim from './trim/index.js'
|
|
8
|
+
export * as splitTrim from './split-trim/index.js'
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export * as charCodes from './char-codes/index.js'
|
|
2
1
|
export * as matches from './matches/index.js'
|
|
3
|
-
export * as
|
|
2
|
+
export * as charCodes from './char-codes/index.js'
|
|
4
3
|
export * as parseTable from './parse-table/index.js'
|
|
4
|
+
export * as normalizeIndent from './normalize-indent/index.js'
|
|
5
5
|
export * as replaceAll from './replace-all/index.js'
|
|
6
6
|
export * as toAlphanum from './to-alphanum/index.js'
|
|
7
|
-
export * as splitTrim from './split-trim/index.js'
|
|
8
7
|
export * as trim from './trim/index.js'
|
|
8
|
+
export * as splitTrim from './split-trim/index.js'
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
* Supported tokens (placeholders must be wrapped in `{{...}}`):
|
|
5
5
|
*
|
|
6
6
|
* **Day**
|
|
7
|
-
* - `D` : Day of month (1–31)
|
|
8
|
-
* - `DD` : Day of month, padded (01–31)
|
|
9
|
-
* - `
|
|
10
|
-
* - `
|
|
7
|
+
* - `D` / `d` : Day of month (1–31)
|
|
8
|
+
* - `DD` / `dd` : Day of month, padded (01–31)
|
|
9
|
+
* - `ddd` : Short weekday name (Mon, Tue, ...)
|
|
10
|
+
* - `dddd` : Full weekday name (Monday, Tuesday, ...)
|
|
11
11
|
*
|
|
12
12
|
* **Month**
|
|
13
13
|
* - `M` : Month number (1–12)
|
|
@@ -45,6 +45,21 @@
|
|
|
45
45
|
* @returns Formatted date string. An unknown token is left untouched, braces
|
|
46
46
|
* included.
|
|
47
47
|
* @see {@link getDateParts} to reach the same parts as plain values, unpadded.
|
|
48
|
+
* @see {@link formatDuration} — the same template grammar, for a length of time
|
|
49
|
+
* rather than a point in it.
|
|
50
|
+
*
|
|
51
|
+
* @remarks
|
|
52
|
+
* This function and `formatDuration` share one grammar, so a reader who has learnt
|
|
53
|
+
* either knows the other: tokens are delimited by `{{…}}` and everything outside
|
|
54
|
+
* them is literal; the bare token is the plain number and the doubled one is that
|
|
55
|
+
* same number padded to two digits; `ms` is padded to three; and an unknown token
|
|
56
|
+
* is left as written rather than blanked, so a typo shows.
|
|
57
|
+
*
|
|
58
|
+
* No token means two different kinds of thing across the two. What differs is only
|
|
59
|
+
* what each domain has to offer: a date has a meridiem, an ordinal suffix and a
|
|
60
|
+
* 12-hour clock (`h`/`hh`, against `H`/`HH` for the 24-hour one), while a duration
|
|
61
|
+
* has weeks and frames. The weekday names are `ddd`/`dddd`, mirroring `MMM`/`MMMM`
|
|
62
|
+
* — `d`/`dd` are the day number, as they are in a duration.
|
|
48
63
|
*
|
|
49
64
|
* @example
|
|
50
65
|
* formatDate(new Date(2026, 0, 1, 15, 5), '{{YYYY}}-{{MM}}-{{DD}} {{hh}}:{{mm}} {{A}}')
|
|
@@ -2,7 +2,7 @@ import { getDateParts } from './parts.js';
|
|
|
2
2
|
// Alternation is ordered, and the first branch that fits wins — so the longest
|
|
3
3
|
// tokens come first. `MM` ahead of `MMMM` would only work by backtracking off the
|
|
4
4
|
// closing braces, which is true but not something a reader should have to derive.
|
|
5
|
-
const tokenRegexp = /\{\{(MMMM|YYYY|MMM|DD|dd|MM|YY|HH|hh|mm|ss|th|ms|D|d|M|H|h|m|s|A|a)\}\}/gv;
|
|
5
|
+
const tokenRegexp = /\{\{(MMMM|YYYY|dddd|MMM|ddd|DD|dd|MM|YY|HH|hh|mm|ss|th|ms|D|d|M|H|h|m|s|A|a)\}\}/gv;
|
|
6
6
|
function pad(value, length) {
|
|
7
7
|
return `${value}`.padStart(length, '0');
|
|
8
8
|
}
|
|
@@ -14,8 +14,10 @@ function pad(value, length) {
|
|
|
14
14
|
const renderers = {
|
|
15
15
|
'D': parts => `${parts.D}`,
|
|
16
16
|
'DD': parts => pad(parts.D, 2),
|
|
17
|
-
'd': parts => parts.
|
|
18
|
-
'dd': parts => parts.
|
|
17
|
+
'd': parts => `${parts.D}`,
|
|
18
|
+
'dd': parts => pad(parts.D, 2),
|
|
19
|
+
'ddd': parts => parts.ddd,
|
|
20
|
+
'dddd': parts => parts.dddd,
|
|
19
21
|
'M': parts => `${parts.M}`,
|
|
20
22
|
'MM': parts => pad(parts.M, 2),
|
|
21
23
|
'MMM': parts => parts.MMM,
|
|
@@ -41,10 +43,10 @@ const renderers = {
|
|
|
41
43
|
* Supported tokens (placeholders must be wrapped in `{{...}}`):
|
|
42
44
|
*
|
|
43
45
|
* **Day**
|
|
44
|
-
* - `D` : Day of month (1–31)
|
|
45
|
-
* - `DD` : Day of month, padded (01–31)
|
|
46
|
-
* - `
|
|
47
|
-
* - `
|
|
46
|
+
* - `D` / `d` : Day of month (1–31)
|
|
47
|
+
* - `DD` / `dd` : Day of month, padded (01–31)
|
|
48
|
+
* - `ddd` : Short weekday name (Mon, Tue, ...)
|
|
49
|
+
* - `dddd` : Full weekday name (Monday, Tuesday, ...)
|
|
48
50
|
*
|
|
49
51
|
* **Month**
|
|
50
52
|
* - `M` : Month number (1–12)
|
|
@@ -82,6 +84,21 @@ const renderers = {
|
|
|
82
84
|
* @returns Formatted date string. An unknown token is left untouched, braces
|
|
83
85
|
* included.
|
|
84
86
|
* @see {@link getDateParts} to reach the same parts as plain values, unpadded.
|
|
87
|
+
* @see {@link formatDuration} — the same template grammar, for a length of time
|
|
88
|
+
* rather than a point in it.
|
|
89
|
+
*
|
|
90
|
+
* @remarks
|
|
91
|
+
* This function and `formatDuration` share one grammar, so a reader who has learnt
|
|
92
|
+
* either knows the other: tokens are delimited by `{{…}}` and everything outside
|
|
93
|
+
* them is literal; the bare token is the plain number and the doubled one is that
|
|
94
|
+
* same number padded to two digits; `ms` is padded to three; and an unknown token
|
|
95
|
+
* is left as written rather than blanked, so a typo shows.
|
|
96
|
+
*
|
|
97
|
+
* No token means two different kinds of thing across the two. What differs is only
|
|
98
|
+
* what each domain has to offer: a date has a meridiem, an ordinal suffix and a
|
|
99
|
+
* 12-hour clock (`h`/`hh`, against `H`/`HH` for the 24-hour one), while a duration
|
|
100
|
+
* has weeks and frames. The weekday names are `ddd`/`dddd`, mirroring `MMM`/`MMMM`
|
|
101
|
+
* — `d`/`dd` are the day number, as they are in a duration.
|
|
85
102
|
*
|
|
86
103
|
* @example
|
|
87
104
|
* formatDate(new Date(2026, 0, 1, 15, 5), '{{YYYY}}-{{MM}}-{{DD}} {{hh}}:{{mm}} {{A}}')
|
|
@@ -53,11 +53,24 @@ describe('formatDate', () => {
|
|
|
53
53
|
});
|
|
54
54
|
describe('locales', () => {
|
|
55
55
|
it('names the weekday and the month in English by default', () => {
|
|
56
|
-
expect(formatDate(thursdayAfternoon, '{{
|
|
56
|
+
expect(formatDate(thursdayAfternoon, '{{dddd}} {{ddd}} {{MMMM}} {{MMM}}'))
|
|
57
57
|
.toBe('Thursday Thu January Jan');
|
|
58
58
|
});
|
|
59
59
|
it('names them in the requested locale', () => {
|
|
60
|
-
expect(formatDate(thursdayAfternoon, '{{
|
|
60
|
+
expect(formatDate(thursdayAfternoon, '{{dddd}} {{MMMM}}', 'fr')).toBe('jeudi janvier');
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
describe('day of month', () => {
|
|
64
|
+
it('reads the day number under d as well as under D', () => {
|
|
65
|
+
expect(formatDate(thursdayAfternoon, '{{d}} {{D}}')).toBe('1 1');
|
|
66
|
+
expect(formatDate(thursdayAfternoon, '{{dd}} {{DD}}')).toBe('01 01');
|
|
67
|
+
});
|
|
68
|
+
// The whole point of moving the weekday names to `ddd`/`dddd`: `{{d}}` and
|
|
69
|
+
// `{{dd}}` now read as a number here and in `formatDuration` alike, and the
|
|
70
|
+
// doubled form is the padded twin of the bare one everywhere.
|
|
71
|
+
it('does not let the shorter spellings swallow the weekday names', () => {
|
|
72
|
+
expect(formatDate(thursdayAfternoon, '{{ddd}}')).toBe('Thu');
|
|
73
|
+
expect(formatDate(thursdayAfternoon, '{{dddd}}')).toBe('Thursday');
|
|
61
74
|
});
|
|
62
75
|
});
|
|
63
76
|
describe('ordinal suffix', () => {
|
|
@@ -104,8 +117,8 @@ describe('getDateParts', () => {
|
|
|
104
117
|
const parts = getDateParts(thursdayAfternoon);
|
|
105
118
|
expect(parts).toMatchObject({
|
|
106
119
|
dayOfMonth: parts.D,
|
|
107
|
-
shortWeekdayName: parts.
|
|
108
|
-
fullWeekdayName: parts.
|
|
120
|
+
shortWeekdayName: parts.ddd,
|
|
121
|
+
fullWeekdayName: parts.dddd,
|
|
109
122
|
monthNumber: parts.M,
|
|
110
123
|
shortMonthName: parts.MMM,
|
|
111
124
|
fullMonthName: parts.MMMM,
|
|
@@ -134,15 +147,15 @@ describe('getDateParts', () => {
|
|
|
134
147
|
describe('locales', () => {
|
|
135
148
|
it('localises the weekday and month names', () => {
|
|
136
149
|
expect(getDateParts(thursdayAfternoon, 'fr')).toMatchObject({
|
|
137
|
-
|
|
138
|
-
|
|
150
|
+
ddd: 'jeu.',
|
|
151
|
+
dddd: 'jeudi',
|
|
139
152
|
MMM: 'janv.',
|
|
140
153
|
MMMM: 'janvier'
|
|
141
154
|
});
|
|
142
155
|
});
|
|
143
156
|
it('falls back to English on a locale the runtime does not support', () => {
|
|
144
157
|
expect(getDateParts(thursdayAfternoon, 'xx')).toMatchObject({
|
|
145
|
-
|
|
158
|
+
dddd: 'Thursday',
|
|
146
159
|
MMMM: 'January',
|
|
147
160
|
th: 'st'
|
|
148
161
|
});
|
|
@@ -68,9 +68,9 @@ export function getDateParts(date, locale = 'en') {
|
|
|
68
68
|
const tokens = {
|
|
69
69
|
'D': day,
|
|
70
70
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
71
|
-
'
|
|
71
|
+
'ddd': weekdayNames(safeLocale, 'short')[dayOfWeek],
|
|
72
72
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
73
|
-
'
|
|
73
|
+
'dddd': weekdayNames(safeLocale, 'long')[dayOfWeek],
|
|
74
74
|
'M': month + 1,
|
|
75
75
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
76
76
|
'MMM': monthNames(safeLocale, 'short')[month],
|
|
@@ -89,8 +89,8 @@ export function getDateParts(date, locale = 'en') {
|
|
|
89
89
|
return {
|
|
90
90
|
...tokens,
|
|
91
91
|
dayOfMonth: tokens.D,
|
|
92
|
-
shortWeekdayName: tokens.
|
|
93
|
-
fullWeekdayName: tokens.
|
|
92
|
+
shortWeekdayName: tokens.ddd,
|
|
93
|
+
fullWeekdayName: tokens.dddd,
|
|
94
94
|
monthNumber: tokens.M,
|
|
95
95
|
shortMonthName: tokens.MMM,
|
|
96
96
|
fullMonthName: tokens.MMMM,
|