@dereekb/util 13.9.0 → 13.10.1
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/fetch/index.cjs.js +5 -3
- package/fetch/index.esm.js +5 -3
- package/fetch/package.json +3 -3
- package/index.cjs.js +682 -384
- package/index.esm.js +676 -384
- package/package.json +5 -5
- package/src/lib/array/array.boolean.d.ts +4 -0
- package/src/lib/array/array.number.d.ts +3 -0
- package/src/lib/auth/auth.role.claims.d.ts +5 -0
- package/src/lib/auth/auth.role.d.ts +5 -0
- package/src/lib/boolean.d.ts +4 -0
- package/src/lib/contact/domain.d.ts +5 -0
- package/src/lib/contact/email.d.ts +10 -0
- package/src/lib/contact/phone.d.ts +10 -0
- package/src/lib/date/date.d.ts +77 -0
- package/src/lib/date/date.time.d.ts +4 -0
- package/src/lib/date/date.unix.d.ts +4 -0
- package/src/lib/date/hour.d.ts +8 -0
- package/src/lib/encryption/encryption.object.d.ts +4 -0
- package/src/lib/error/error.d.ts +4 -0
- package/src/lib/file/file.d.ts +4 -0
- package/src/lib/file/xml.d.ts +4 -0
- package/src/lib/function/function.d.ts +1 -1
- package/src/lib/hash.d.ts +4 -0
- package/src/lib/model/model.d.ts +20 -0
- package/src/lib/number/bitwise.dencoder.d.ts +8 -0
- package/src/lib/number/dollar.d.ts +31 -0
- package/src/lib/number/encoded.d.ts +8 -0
- package/src/lib/number/number.d.ts +15 -0
- package/src/lib/number/pay.d.ts +8 -0
- package/src/lib/number/round.d.ts +10 -0
- package/src/lib/object/object.d.ts +4 -0
- package/src/lib/object/object.filter.pojo.d.ts +10 -0
- package/src/lib/page/page.d.ts +5 -0
- package/src/lib/path/path.d.ts +8 -0
- package/src/lib/promise/promise.d.ts +5 -0
- package/src/lib/relation/relation.d.ts +10 -0
- package/src/lib/sort.d.ts +3 -0
- package/src/lib/storage/storage.d.ts +9 -0
- package/src/lib/string/case.d.ts +28 -0
- package/src/lib/string/dencoder.d.ts +12 -0
- package/src/lib/string/html.d.ts +20 -0
- package/src/lib/string/index.d.ts +1 -0
- package/src/lib/string/json.d.ts +4 -0
- package/src/lib/string/mimetype.d.ts +13 -1
- package/src/lib/string/password.d.ts +4 -0
- package/src/lib/string/prefix.d.ts +36 -0
- package/src/lib/string/tree.d.ts +4 -0
- package/src/lib/string/url.d.ts +35 -1
- package/src/lib/value/address.d.ts +35 -0
- package/src/lib/value/cron.d.ts +4 -0
- package/src/lib/value/indexed.d.ts +4 -0
- package/src/lib/value/modifier.d.ts +4 -0
- package/src/lib/value/pixel.d.ts +14 -0
- package/src/lib/value/point.d.ts +11 -0
- package/src/lib/value/zoom.d.ts +4 -0
- package/test/index.cjs.js +1 -0
- package/test/index.esm.js +1 -0
- package/test/package.json +3 -3
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
import { type ArrayOrValue } from './../array/array';
|
|
2
2
|
import { type Maybe } from '../value/maybe.type';
|
|
3
3
|
import { type FilterKeyValueTuplesInput, type KeyValueTuple, type KeyValueTupleFilter, KeyValueTypleValueFilter } from './object.filter.tuple';
|
|
4
|
+
/**
|
|
5
|
+
* Strips the input object. If the object has no keys after the filtering process, returns undefined.
|
|
6
|
+
*/
|
|
7
|
+
export type StripObjectFunction<T extends object> = (input: Maybe<T>, copy?: Maybe<boolean>) => T | undefined;
|
|
8
|
+
/**
|
|
9
|
+
*
|
|
10
|
+
* @param input
|
|
11
|
+
*/
|
|
12
|
+
export declare function stripObjectFunction<T extends object>(filter: FilterKeyValueTuplesInput<T>, copy?: boolean): StripObjectFunction<T>;
|
|
13
|
+
export declare function stripObject<T extends object>(input: Maybe<T>, copy?: boolean): T | undefined;
|
|
4
14
|
/**
|
|
5
15
|
* Assigns all non-filtered values from one or more source objects into the target object.
|
|
6
16
|
*
|
package/src/lib/page/page.d.ts
CHANGED
|
@@ -13,6 +13,11 @@ export declare const FIRST_PAGE = 0;
|
|
|
13
13
|
export declare const FINAL_PAGE = -2;
|
|
14
14
|
/**
|
|
15
15
|
* Numeric page identifier.
|
|
16
|
+
*
|
|
17
|
+
* @semanticType
|
|
18
|
+
* @semanticTopic numeric
|
|
19
|
+
* @semanticTopic reference
|
|
20
|
+
* @semanticTopic dereekb-util:pagination
|
|
16
21
|
*/
|
|
17
22
|
export type PageNumber = number;
|
|
18
23
|
/**
|
package/src/lib/path/path.d.ts
CHANGED
|
@@ -38,6 +38,10 @@ export type InferredSlashPathFolder = SlashPathFolder | EmptyRelativeSlashPathFo
|
|
|
38
38
|
* The file extension of a SlashPathTypedFile.
|
|
39
39
|
*
|
|
40
40
|
* e.g. 'png' in 'image.png'
|
|
41
|
+
*
|
|
42
|
+
* @semanticType
|
|
43
|
+
* @semanticTopic string
|
|
44
|
+
* @semanticTopic dereekb-util:path
|
|
41
45
|
*/
|
|
42
46
|
export type SlashPathTypedFileExtension = string;
|
|
43
47
|
/**
|
|
@@ -48,6 +52,10 @@ export type SlashPathTypedFileExtension = string;
|
|
|
48
52
|
export type SlashPathTypedFileSuffix = `${SlashFileTypeSeparatorString}${SlashPathTypedFileExtension}`;
|
|
49
53
|
/**
|
|
50
54
|
* A SlashPath file name without a file type identifier (e.g. 'image', and not 'image.png')
|
|
55
|
+
*
|
|
56
|
+
* @semanticType
|
|
57
|
+
* @semanticTopic string
|
|
58
|
+
* @semanticTopic dereekb-util:path
|
|
51
59
|
*/
|
|
52
60
|
export type SlashPathUntypedFile = string;
|
|
53
61
|
/**
|
|
@@ -124,6 +124,11 @@ export declare function performAsyncTasks<I, O = unknown, K extends PrimativeKey
|
|
|
124
124
|
export declare function performAsyncTask<O>(taskFn: () => Promise<O>, config?: PerformAsyncTaskConfig<0>): Promise<PerformAsyncTaskResult<O>>;
|
|
125
125
|
/**
|
|
126
126
|
* Used as a key to identify the "group" that a task belongs to to prevent other concurrent tasks from that group from running in parallel when parallel execution is desired.
|
|
127
|
+
*
|
|
128
|
+
* @semanticType
|
|
129
|
+
* @semanticTopic identifier
|
|
130
|
+
* @semanticTopic string
|
|
131
|
+
* @semanticTopic dereekb-util:concurrency
|
|
127
132
|
*/
|
|
128
133
|
export type PerformTasksInParallelTaskUniqueKey = string;
|
|
129
134
|
/**
|
|
@@ -40,6 +40,11 @@ export declare const RelationChange: {
|
|
|
40
40
|
export type RelationChangeType = (typeof RelationChange)[keyof typeof RelationChange];
|
|
41
41
|
/**
|
|
42
42
|
* A string-based relation identifier.
|
|
43
|
+
*
|
|
44
|
+
* @semanticType
|
|
45
|
+
* @semanticTopic identifier
|
|
46
|
+
* @semanticTopic string
|
|
47
|
+
* @semanticTopic dereekb-util:relation
|
|
43
48
|
*/
|
|
44
49
|
export type RelationString = string;
|
|
45
50
|
/**
|
|
@@ -48,6 +53,11 @@ export type RelationString = string;
|
|
|
48
53
|
export type RelationObject = RelationString | object;
|
|
49
54
|
/**
|
|
50
55
|
* A string identifying the type/category of a relation model.
|
|
56
|
+
*
|
|
57
|
+
* @semanticType
|
|
58
|
+
* @semanticTopic identifier
|
|
59
|
+
* @semanticTopic string
|
|
60
|
+
* @semanticTopic dereekb-util:relation
|
|
51
61
|
*/
|
|
52
62
|
export type RelationModelType = string;
|
|
53
63
|
/**
|
package/src/lib/sort.d.ts
CHANGED
|
@@ -15,6 +15,9 @@ export declare const SORT_VALUE_EQUAL: SortComparisonNumber;
|
|
|
15
15
|
*
|
|
16
16
|
* In "descending" order, this returns the opposite values as "ascending".
|
|
17
17
|
* - Example: b - a
|
|
18
|
+
*
|
|
19
|
+
* @semanticType
|
|
20
|
+
* @semanticTopic numeric
|
|
18
21
|
*/
|
|
19
22
|
export type SortComparisonNumber = number;
|
|
20
23
|
/**
|
|
@@ -1,10 +1,19 @@
|
|
|
1
1
|
import { type UnixDateTimeMillisecondsNumber } from '../date/date';
|
|
2
2
|
/**
|
|
3
3
|
* String representation of data that is stored.
|
|
4
|
+
*
|
|
5
|
+
* @semanticType
|
|
6
|
+
* @semanticTopic string
|
|
7
|
+
* @semanticTopic reference
|
|
4
8
|
*/
|
|
5
9
|
export type StoredDataString = string;
|
|
6
10
|
/**
|
|
7
11
|
* Key used for accessing stored data.
|
|
12
|
+
*
|
|
13
|
+
* @semanticType
|
|
14
|
+
* @semanticTopic identifier
|
|
15
|
+
* @semanticTopic string
|
|
16
|
+
* @semanticTopic reference
|
|
8
17
|
*/
|
|
9
18
|
export type StoredDataStorageKey = string;
|
|
10
19
|
/**
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure string-case converters that do not pull in the
|
|
3
|
+
* {@link change-case-all} dependency.
|
|
4
|
+
*
|
|
5
|
+
* Use these for the common SCREAMING_SNAKE ↔ camelCase conversions
|
|
6
|
+
* (constant-name ↔ symbol-name flips) without paying for the full
|
|
7
|
+
* change-case bundle. For arbitrary case detection / round-tripping
|
|
8
|
+
* across mixed inputs, prefer the dedicated package.
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Converts a SCREAMING_SNAKE_CASE string into camelCase.
|
|
12
|
+
*
|
|
13
|
+
* Empty segments (e.g. leading underscores in `_USER_ID`) are skipped.
|
|
14
|
+
*
|
|
15
|
+
* @param input The SCREAMING_SNAKE_CASE input.
|
|
16
|
+
* @returns The camelCase form.
|
|
17
|
+
*/
|
|
18
|
+
export declare function screamingSnakeToCamelCase(input: string): string;
|
|
19
|
+
/**
|
|
20
|
+
* Converts a camelCase or PascalCase string into SCREAMING_SNAKE_CASE.
|
|
21
|
+
*
|
|
22
|
+
* Each upper-case character (other than the first) is preceded by an
|
|
23
|
+
* underscore, then the whole result is upper-cased.
|
|
24
|
+
*
|
|
25
|
+
* @param input The camelCase / PascalCase input.
|
|
26
|
+
* @returns The SCREAMING_SNAKE_CASE form.
|
|
27
|
+
*/
|
|
28
|
+
export declare function camelOrPascalToScreamingSnake(input: string): string;
|
|
@@ -108,16 +108,28 @@ export type PrimativeKeyStringDencoderFunction<D extends PrimativeKey, E extends
|
|
|
108
108
|
export declare function primativeKeyStringDencoder<D extends PrimativeKey, E extends PrimativeKey>(config: PrimativeKeyStringDencoderConfig<D, E>): PrimativeKeyStringDencoderFunction<D, E>;
|
|
109
109
|
/**
|
|
110
110
|
* An encodable number. This is typically a positive integer value.
|
|
111
|
+
*
|
|
112
|
+
* @semanticType
|
|
113
|
+
* @semanticTopic numeric
|
|
114
|
+
* @semanticTopic dereekb-util:encoding
|
|
111
115
|
*/
|
|
112
116
|
export type NumberStringDencoderNumber = number;
|
|
113
117
|
/**
|
|
114
118
|
* A number-encoded string. Little-Endian. Should Decode to the same value each time.
|
|
119
|
+
*
|
|
120
|
+
* @semanticType
|
|
121
|
+
* @semanticTopic string
|
|
122
|
+
* @semanticTopic dereekb-util:encoding
|
|
115
123
|
*/
|
|
116
124
|
export type NumberStringDencoderString = string;
|
|
117
125
|
/**
|
|
118
126
|
* Digits used when encoding/decoding a value.
|
|
119
127
|
*
|
|
120
128
|
* The number of digits/characters must be a factor of 2. I.E. 8, 16, 32, 64
|
|
129
|
+
*
|
|
130
|
+
* @semanticType
|
|
131
|
+
* @semanticTopic string
|
|
132
|
+
* @semanticTopic dereekb-util:encoding
|
|
121
133
|
*/
|
|
122
134
|
export type NumberStringDencoderDigits = string;
|
|
123
135
|
/**
|
package/src/lib/string/html.d.ts
CHANGED
|
@@ -7,6 +7,10 @@ import { type PrimativeValue } from '../type';
|
|
|
7
7
|
export type HtmlHeaderLevel = 1 | 2 | 3 | 4 | 5 | 6;
|
|
8
8
|
/**
|
|
9
9
|
* Represents a single CSS Class
|
|
10
|
+
*
|
|
11
|
+
* @semanticType
|
|
12
|
+
* @semanticTopic string
|
|
13
|
+
* @semanticTopic dereekb-util:css
|
|
10
14
|
*/
|
|
11
15
|
export type CssClass = string;
|
|
12
16
|
/**
|
|
@@ -16,6 +20,10 @@ export type CssClass = string;
|
|
|
16
20
|
* ```ts
|
|
17
21
|
* const name: CssTokenName = 'dbx-primary-color';
|
|
18
22
|
* ```
|
|
23
|
+
*
|
|
24
|
+
* @semanticType
|
|
25
|
+
* @semanticTopic string
|
|
26
|
+
* @semanticTopic dereekb-util:css
|
|
19
27
|
*/
|
|
20
28
|
export type CssTokenName = string;
|
|
21
29
|
/**
|
|
@@ -62,10 +70,18 @@ export type CssVariableVar<T extends CssToken = CssToken> = CssTokenVar<T>;
|
|
|
62
70
|
export declare const cssVariableVar: typeof cssTokenVar;
|
|
63
71
|
/**
|
|
64
72
|
* Represents a single CSS Style
|
|
73
|
+
*
|
|
74
|
+
* @semanticType
|
|
75
|
+
* @semanticTopic string
|
|
76
|
+
* @semanticTopic dereekb-util:css
|
|
65
77
|
*/
|
|
66
78
|
export type CssStyle = string;
|
|
67
79
|
/**
|
|
68
80
|
* Represents one or more CssClasses that are space separated.
|
|
81
|
+
*
|
|
82
|
+
* @semanticType
|
|
83
|
+
* @semanticTopic string
|
|
84
|
+
* @semanticTopic dereekb-util:css
|
|
69
85
|
*/
|
|
70
86
|
export type SpaceSeparatedCssClasses = string;
|
|
71
87
|
/**
|
|
@@ -74,6 +90,10 @@ export type SpaceSeparatedCssClasses = string;
|
|
|
74
90
|
export type CssStyleObject = Record<string, Maybe<PrimativeValue>>;
|
|
75
91
|
/**
|
|
76
92
|
* Represents one or more CssStyles that are space separated.
|
|
93
|
+
*
|
|
94
|
+
* @semanticType
|
|
95
|
+
* @semanticTopic string
|
|
96
|
+
* @semanticTopic dereekb-util:css
|
|
77
97
|
*/
|
|
78
98
|
export type SpaceSeparatedCssStyles = string;
|
|
79
99
|
/**
|
package/src/lib/string/json.d.ts
CHANGED
|
@@ -4,6 +4,10 @@ import { type Maybe } from '../value/maybe.type';
|
|
|
4
4
|
* A simple mime type string with just the type/subtype and no parameters.
|
|
5
5
|
*
|
|
6
6
|
* I.E. "application/json"
|
|
7
|
+
*
|
|
8
|
+
* @semanticType
|
|
9
|
+
* @semanticTopic string
|
|
10
|
+
* @semanticTopic dereekb-util:mime
|
|
7
11
|
*/
|
|
8
12
|
export type MimeTypeWithoutParameters = string;
|
|
9
13
|
/**
|
|
@@ -14,12 +18,20 @@ export type MimeTypeWildcard = '*';
|
|
|
14
18
|
* A mime type with a wildcard subtype. Has a star as the subtype.
|
|
15
19
|
*
|
|
16
20
|
* I.E. "application/*"
|
|
21
|
+
*
|
|
22
|
+
* @semanticType
|
|
23
|
+
* @semanticTopic string
|
|
24
|
+
* @semanticTopic dereekb-util:mime
|
|
17
25
|
*/
|
|
18
26
|
export type MimeTypeWithSubtypeWildcardWithoutParameters = string;
|
|
19
27
|
/**
|
|
20
28
|
* A mime type string that may contain additional parameters.
|
|
21
29
|
*
|
|
22
30
|
* I.E. "text/plain", "application/json; charset=utf-8"
|
|
31
|
+
*
|
|
32
|
+
* @semanticType
|
|
33
|
+
* @semanticTopic string
|
|
34
|
+
* @semanticTopic dereekb-util:mime
|
|
23
35
|
*/
|
|
24
36
|
export type ContentTypeMimeType = string;
|
|
25
37
|
/**
|
|
@@ -211,4 +223,4 @@ export declare function fileExtensionForMimeType(mimeType: Maybe<MimeTypeWithout
|
|
|
211
223
|
*
|
|
212
224
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Content-Disposition
|
|
213
225
|
*/
|
|
214
|
-
export type ContentDispositionString = 'inline' | 'attachment' | string;
|
|
226
|
+
export type ContentDispositionString = 'inline' | 'attachment' | (string & {});
|
|
@@ -3,16 +3,28 @@ import { type Maybe } from '../value/maybe.type';
|
|
|
3
3
|
* A character or string that is added to the start of a string.
|
|
4
4
|
*
|
|
5
5
|
* Example: '-' in "-class"
|
|
6
|
+
*
|
|
7
|
+
* @semanticType
|
|
8
|
+
* @semanticTopic string
|
|
9
|
+
* @semanticTopic dereekb-util:prefix
|
|
6
10
|
*/
|
|
7
11
|
export type CharacterPrefix = string;
|
|
8
12
|
/**
|
|
9
13
|
* A character or string that is added to the end of a string.
|
|
10
14
|
*
|
|
11
15
|
* Example: '-' in "class-"
|
|
16
|
+
*
|
|
17
|
+
* @semanticType
|
|
18
|
+
* @semanticTopic string
|
|
19
|
+
* @semanticTopic dereekb-util:prefix
|
|
12
20
|
*/
|
|
13
21
|
export type CharacterSuffix = string;
|
|
14
22
|
/**
|
|
15
23
|
* A string that does not have a CharacterPrefix or CharacterSuffix.
|
|
24
|
+
*
|
|
25
|
+
* @semanticType
|
|
26
|
+
* @semanticTopic string
|
|
27
|
+
* @semanticTopic dereekb-util:prefix
|
|
16
28
|
*/
|
|
17
29
|
export type CharacterPrefixSuffixCleanString = string;
|
|
18
30
|
/**
|
|
@@ -83,6 +95,30 @@ export interface CharacterPrefixSuffixInstance<P extends CharacterPrefix = '', S
|
|
|
83
95
|
* @returns A new instance for managing prefix/suffix operations on strings.
|
|
84
96
|
*/
|
|
85
97
|
export declare function characterPrefixSuffixInstance<P extends CharacterPrefix = '', S extends CharacterSuffix = ''>(config: CharacterPrefixSuffixInstanceConfiguration<P, S>): CharacterPrefixSuffixInstance<P, S>;
|
|
98
|
+
/**
|
|
99
|
+
* Removes the given suffix from the input string when present, or
|
|
100
|
+
* returns `undefined` when the input does not end with the suffix.
|
|
101
|
+
*
|
|
102
|
+
* Use this when callers want to detect whether the suffix was present
|
|
103
|
+
* (vs. {@link removeFirstMatchingSuffix}, which silently passes the
|
|
104
|
+
* input through).
|
|
105
|
+
*
|
|
106
|
+
* @param input The string to trim.
|
|
107
|
+
* @param suffix The suffix to remove.
|
|
108
|
+
* @returns The input without the suffix, or `undefined` when the input
|
|
109
|
+
* does not end with the suffix.
|
|
110
|
+
*/
|
|
111
|
+
export declare function removeSuffix(input: string, suffix: string): Maybe<string>;
|
|
112
|
+
/**
|
|
113
|
+
* Removes the first matching suffix from the input string. Returns the
|
|
114
|
+
* input unchanged when none of the suffixes match.
|
|
115
|
+
*
|
|
116
|
+
* @param input The string to trim.
|
|
117
|
+
* @param suffixes The suffixes to try in order.
|
|
118
|
+
* @returns The input with the first matching suffix removed, or the
|
|
119
|
+
* input unchanged when no suffix matches.
|
|
120
|
+
*/
|
|
121
|
+
export declare function removeFirstMatchingSuffix(input: string, suffixes: readonly string[]): string;
|
|
86
122
|
/**
|
|
87
123
|
* A string with a dash prefix.
|
|
88
124
|
*
|
package/src/lib/string/tree.d.ts
CHANGED
|
@@ -2,6 +2,10 @@ import { type ArrayOrValue } from '../array/array';
|
|
|
2
2
|
import { type Maybe } from '../value/maybe.type';
|
|
3
3
|
/**
|
|
4
4
|
* A string value representing a node in a split string tree.
|
|
5
|
+
*
|
|
6
|
+
* @semanticType
|
|
7
|
+
* @semanticTopic string
|
|
8
|
+
* @semanticTopic dereekb-util:tree
|
|
5
9
|
*/
|
|
6
10
|
export type SplitStringTreeNodeString = string;
|
|
7
11
|
/**
|
package/src/lib/string/url.d.ts
CHANGED
|
@@ -8,6 +8,10 @@ import { type Maybe } from '../value/maybe.type';
|
|
|
8
8
|
* Connection protocol
|
|
9
9
|
*
|
|
10
10
|
* I.E. http, https, etc.
|
|
11
|
+
*
|
|
12
|
+
* @semanticType
|
|
13
|
+
* @semanticTopic url
|
|
14
|
+
* @semanticTopic string
|
|
11
15
|
*/
|
|
12
16
|
export type WebsiteProtocol = string;
|
|
13
17
|
/**
|
|
@@ -35,10 +39,16 @@ export declare function isKnownHttpWebsiteProtocol(input: string): input is Know
|
|
|
35
39
|
* Examples:
|
|
36
40
|
* - dereekb.com
|
|
37
41
|
* - components.dereekb.com
|
|
42
|
+
*
|
|
43
|
+
* @semanticType
|
|
44
|
+
* @semanticTopic url
|
|
45
|
+
* @semanticTopic string
|
|
38
46
|
*/
|
|
39
47
|
export type WebsiteDomain = string;
|
|
40
48
|
/**
|
|
41
|
-
* Simple website domain regex that looks for a period in the string between the domain and the tld
|
|
49
|
+
* Simple website domain regex that looks for a period in the string between the domain and the tld.
|
|
50
|
+
*
|
|
51
|
+
* Anchored character-class form prevents catastrophic backtracking on inputs without a period.
|
|
42
52
|
*/
|
|
43
53
|
export declare const HAS_WEBSITE_DOMAIN_NAME_REGEX: RegExp;
|
|
44
54
|
/**
|
|
@@ -61,6 +71,10 @@ export declare function hasWebsiteDomain(input: string): input is WebsiteDomain;
|
|
|
61
71
|
* Examples:
|
|
62
72
|
* - com
|
|
63
73
|
* - net
|
|
74
|
+
*
|
|
75
|
+
* @semanticType
|
|
76
|
+
* @semanticTopic url
|
|
77
|
+
* @semanticTopic string
|
|
64
78
|
*/
|
|
65
79
|
export type WebsiteTopLevelDomain = string;
|
|
66
80
|
/**
|
|
@@ -87,6 +101,10 @@ export declare const HAS_PORT_NUMBER_REGEX: RegExp;
|
|
|
87
101
|
* Example:
|
|
88
102
|
* - 443
|
|
89
103
|
* - 8080
|
|
104
|
+
*
|
|
105
|
+
* @semanticType
|
|
106
|
+
* @semanticTopic numeric
|
|
107
|
+
* @semanticTopic url
|
|
90
108
|
*/
|
|
91
109
|
export type PortNumber = number;
|
|
92
110
|
/**
|
|
@@ -138,6 +156,10 @@ export declare function baseWebsiteUrl(input: BaseWebsiteUrlInput, defaultTld?:
|
|
|
138
156
|
* - https://components.dereekb.com/
|
|
139
157
|
* - https://components.dereekb.com/doc/home?
|
|
140
158
|
* - https://components.dereekb.com/doc/home?test=true&test2=true
|
|
159
|
+
*
|
|
160
|
+
* @semanticType
|
|
161
|
+
* @semanticTopic url
|
|
162
|
+
* @semanticTopic string
|
|
141
163
|
*/
|
|
142
164
|
export type WebsiteUrl = string;
|
|
143
165
|
/**
|
|
@@ -207,6 +229,10 @@ export interface WebsiteUrlDetails {
|
|
|
207
229
|
export declare function websiteUrlDetails(input: string): WebsiteUrlDetails;
|
|
208
230
|
/**
|
|
209
231
|
* A website url that starts with the proper http/https prefix.
|
|
232
|
+
*
|
|
233
|
+
* @semanticType
|
|
234
|
+
* @semanticTopic url
|
|
235
|
+
* @semanticTopic string
|
|
210
236
|
*/
|
|
211
237
|
export type WebsiteUrlWithPrefix = string;
|
|
212
238
|
/**
|
|
@@ -231,6 +257,10 @@ export declare function isWebsiteUrlWithPrefix(input: string): input is WebsiteU
|
|
|
231
257
|
* Non-examples:
|
|
232
258
|
* - localhost:8080 // not internet-accessible
|
|
233
259
|
* - test://dereekb.com // non-http/https protocol
|
|
260
|
+
*
|
|
261
|
+
* @semanticType
|
|
262
|
+
* @semanticTopic url
|
|
263
|
+
* @semanticTopic string
|
|
234
264
|
*/
|
|
235
265
|
export type StandardInternetAccessibleWebsiteUrl = string;
|
|
236
266
|
/**
|
|
@@ -247,6 +277,10 @@ export declare function isStandardInternetAccessibleWebsiteUrl(input: string): i
|
|
|
247
277
|
* - dereekb.com
|
|
248
278
|
* - components.dereekb.com/
|
|
249
279
|
* - components.dereekb.com/doc/home
|
|
280
|
+
*
|
|
281
|
+
* @semanticType
|
|
282
|
+
* @semanticTopic url
|
|
283
|
+
* @semanticTopic string
|
|
250
284
|
*/
|
|
251
285
|
export type WebsiteDomainAndPath = string;
|
|
252
286
|
/**
|
|
@@ -1,30 +1,65 @@
|
|
|
1
1
|
import { type Maybe } from './maybe.type';
|
|
2
2
|
/**
|
|
3
3
|
* City name string (e.g. "San Antonio").
|
|
4
|
+
*
|
|
5
|
+
* @semanticType
|
|
6
|
+
* @semanticTopic geo
|
|
7
|
+
* @semanticTopic string
|
|
8
|
+
* @semanticTopic dereekb-util:address
|
|
4
9
|
*/
|
|
5
10
|
export type CityString = string;
|
|
6
11
|
/**
|
|
7
12
|
* Full state name string (e.g. "Texas").
|
|
13
|
+
*
|
|
14
|
+
* @semanticType
|
|
15
|
+
* @semanticTopic geo
|
|
16
|
+
* @semanticTopic string
|
|
17
|
+
* @semanticTopic dereekb-util:address
|
|
8
18
|
*/
|
|
9
19
|
export type StateString = string;
|
|
10
20
|
/**
|
|
11
21
|
* Two-letter US state code (e.g. "TX").
|
|
22
|
+
*
|
|
23
|
+
* @semanticType
|
|
24
|
+
* @semanticTopic geo
|
|
25
|
+
* @semanticTopic string
|
|
26
|
+
* @semanticTopic dereekb-util:address
|
|
12
27
|
*/
|
|
13
28
|
export type StateCodeString = string;
|
|
14
29
|
/**
|
|
15
30
|
* Full country name string (e.g. "United States").
|
|
31
|
+
*
|
|
32
|
+
* @semanticType
|
|
33
|
+
* @semanticTopic geo
|
|
34
|
+
* @semanticTopic string
|
|
35
|
+
* @semanticTopic dereekb-util:address
|
|
16
36
|
*/
|
|
17
37
|
export type CountryString = string;
|
|
18
38
|
/**
|
|
19
39
|
* Country code string (e.g. "US").
|
|
40
|
+
*
|
|
41
|
+
* @semanticType
|
|
42
|
+
* @semanticTopic geo
|
|
43
|
+
* @semanticTopic string
|
|
44
|
+
* @semanticTopic dereekb-util:address
|
|
20
45
|
*/
|
|
21
46
|
export type CountryCodeString = string;
|
|
22
47
|
/**
|
|
23
48
|
* A single line in a street address.
|
|
49
|
+
*
|
|
50
|
+
* @semanticType
|
|
51
|
+
* @semanticTopic geo
|
|
52
|
+
* @semanticTopic string
|
|
53
|
+
* @semanticTopic dereekb-util:address
|
|
24
54
|
*/
|
|
25
55
|
export type AddressLineString = string;
|
|
26
56
|
/**
|
|
27
57
|
* Postal/zip code string.
|
|
58
|
+
*
|
|
59
|
+
* @semanticType
|
|
60
|
+
* @semanticTopic geo
|
|
61
|
+
* @semanticTopic string
|
|
62
|
+
* @semanticTopic dereekb-util:address
|
|
28
63
|
*/
|
|
29
64
|
export type ZipCodeString = string;
|
|
30
65
|
/**
|
package/src/lib/value/cron.d.ts
CHANGED
|
@@ -10,6 +10,10 @@ import { type FilterUniqueFunctionExcludeKeysInput } from '../array/array.unique
|
|
|
10
10
|
* An integer that denotes which index an item is at.
|
|
11
11
|
*
|
|
12
12
|
* Is typically non-negative only.
|
|
13
|
+
*
|
|
14
|
+
* @semanticType
|
|
15
|
+
* @semanticTopic numeric
|
|
16
|
+
* @semanticTopic reference
|
|
13
17
|
*/
|
|
14
18
|
export type IndexNumber = number;
|
|
15
19
|
/**
|
|
@@ -2,6 +2,10 @@ import { type ArrayOrValue } from '../array';
|
|
|
2
2
|
import { type Maybe } from './maybe.type';
|
|
3
3
|
/**
|
|
4
4
|
* String key that uniquely identifies a modifier within a {@link ModifierMap}.
|
|
5
|
+
*
|
|
6
|
+
* @semanticType
|
|
7
|
+
* @semanticTopic string
|
|
8
|
+
* @semanticTopic identifier
|
|
5
9
|
*/
|
|
6
10
|
export type ModifierKey = string;
|
|
7
11
|
/**
|
package/src/lib/value/pixel.d.ts
CHANGED
|
@@ -1,2 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pixel count.
|
|
3
|
+
*
|
|
4
|
+
* @semanticType
|
|
5
|
+
* @semanticTopic measurement
|
|
6
|
+
* @semanticTopic numeric
|
|
7
|
+
*/
|
|
1
8
|
export type Pixels = number;
|
|
9
|
+
/**
|
|
10
|
+
* Pixel count as a string with a "px" suffix (e.g. "100px").
|
|
11
|
+
*
|
|
12
|
+
* @semanticType
|
|
13
|
+
* @semanticTopic measurement
|
|
14
|
+
* @semanticTopic string
|
|
15
|
+
*/
|
|
2
16
|
export type PixelsString = string;
|
package/src/lib/value/point.d.ts
CHANGED
|
@@ -3,10 +3,18 @@ import { type NumberPrecision, type RoundToPrecisionFunctionType } from '../numb
|
|
|
3
3
|
import { type Maybe } from './maybe.type';
|
|
4
4
|
/**
|
|
5
5
|
* Latitude value in degrees, ranging from -90 to 90.
|
|
6
|
+
*
|
|
7
|
+
* @semanticType
|
|
8
|
+
* @semanticTopic geo
|
|
9
|
+
* @semanticTopic numeric
|
|
6
10
|
*/
|
|
7
11
|
export type Latitude = number;
|
|
8
12
|
/**
|
|
9
13
|
* Longitude value in degrees, ranging from -180 to 180.
|
|
14
|
+
*
|
|
15
|
+
* @semanticType
|
|
16
|
+
* @semanticTopic geo
|
|
17
|
+
* @semanticTopic numeric
|
|
10
18
|
*/
|
|
11
19
|
export type Longitude = number;
|
|
12
20
|
/**
|
|
@@ -35,6 +43,9 @@ export declare const MAX_LONGITUDE_VALUE = 180;
|
|
|
35
43
|
export declare const TOTAL_LONGITUDE_RANGE: number;
|
|
36
44
|
/**
|
|
37
45
|
* A geographic point represented by latitude and longitude.
|
|
46
|
+
*
|
|
47
|
+
* @semanticType
|
|
48
|
+
* @semanticTopic geo
|
|
38
49
|
*/
|
|
39
50
|
export interface LatLngPoint {
|
|
40
51
|
lat: Latitude;
|
package/src/lib/value/zoom.d.ts
CHANGED
package/test/index.cjs.js
CHANGED
|
@@ -937,6 +937,7 @@ function _inherits$2(subClass, superClass) {
|
|
|
937
937
|
if (superClass) _set_prototype_of$2(subClass, superClass);
|
|
938
938
|
}
|
|
939
939
|
function _instanceof(left, right) {
|
|
940
|
+
"@swc/helpers - instanceof";
|
|
940
941
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
941
942
|
return !!right[Symbol.hasInstance](left);
|
|
942
943
|
} else {
|
package/test/index.esm.js
CHANGED
|
@@ -935,6 +935,7 @@ function _inherits$2(subClass, superClass) {
|
|
|
935
935
|
if (superClass) _set_prototype_of$2(subClass, superClass);
|
|
936
936
|
}
|
|
937
937
|
function _instanceof(left, right) {
|
|
938
|
+
"@swc/helpers - instanceof";
|
|
938
939
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
939
940
|
return !!right[Symbol.hasInstance](left);
|
|
940
941
|
} else {
|
package/test/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dereekb/util/test",
|
|
3
|
-
"version": "13.
|
|
3
|
+
"version": "13.10.1",
|
|
4
4
|
"peerDependencies": {
|
|
5
|
-
"@dereekb/util": "13.
|
|
6
|
-
"make-error": "^1.3.
|
|
5
|
+
"@dereekb/util": "13.10.1",
|
|
6
|
+
"make-error": "^1.3.6"
|
|
7
7
|
},
|
|
8
8
|
"exports": {
|
|
9
9
|
"./package.json": "./package.json",
|