@arabig/origin 1.0.0 → 1.1.0
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/fesm2022/arabig-origin-record.mjs +2 -2
- package/fesm2022/arabig-origin-record.mjs.map +1 -1
- package/fesm2022/arabig-origin-types.mjs.map +1 -1
- package/package.json +10 -9
- package/{record/index.d.ts → types/arabig-origin-record.d.ts} +2 -2
- package/types/{index.d.ts → arabig-origin-types.d.ts} +1 -1
- /package/{functions/index.d.ts → types/arabig-origin-functions.d.ts} +0 -0
- /package/{operand/index.d.ts → types/arabig-origin-operand.d.ts} +0 -0
- /package/{vault/index.d.ts → types/arabig-origin-vault.d.ts} +0 -0
- /package/{index.d.ts → types/arabig-origin.d.ts} +0 -0
|
@@ -87,11 +87,11 @@ class AoRecord {
|
|
|
87
87
|
return true;
|
|
88
88
|
}
|
|
89
89
|
/**
|
|
90
|
-
* Tests the trueness of the given condition for
|
|
90
|
+
* Tests the trueness of the given condition for at least one entry.
|
|
91
91
|
* @param predicate The callback that iterates within {@link AoRecord} entries and
|
|
92
92
|
* provides the key and value in form of {@link AoEntryUnion} as parameter and must
|
|
93
93
|
* return a boolean type determines the condition for current entry
|
|
94
|
-
* @returns True, if the given conditions is true for
|
|
94
|
+
* @returns True, if the given conditions is true for at least one entry otherwise false
|
|
95
95
|
*/
|
|
96
96
|
some(predicate) {
|
|
97
97
|
for (const key in this._entries) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"arabig-origin-record.mjs","sources":["../../../projects/origin/record/record.ts","../../../projects/origin/record/arabig-origin-record.ts"],"sourcesContent":["/**\r\n * @license\r\n * Copyright Salar Arab All Rights Reserved.\r\n * \r\n * @author Salar Arab <salar_arab@outlook.com>\r\n */\r\n\r\nimport { aoFilterObject } from \"@arabig/origin/functions\";\r\nimport { AoEntryUnion, AoObject } from \"@arabig/origin/types\";\r\n\r\n/**\r\n * Utilizes performing common operations as pipeline on object-like.\r\n *\r\n * @remarks\r\n * {@link AoRecord} provides a fluent and type-safe API for manipulating objects.\r\n * It includes methods for filtering, mapping, and transforming key-value pairs—similar to\r\n * array utilities but designed for object semantics.\r\n *\r\n * This class is ideal for scenarios where object-based data structures need to be processed\r\n * functionally, such as configuration maps, lookup tables, or DTO transformations.\r\n *\r\n * @typeParam T - The type of entries contained in the record.\r\n *\r\n * @example\r\n * ```ts\r\n * const rec = new AoRecord({\r\n * name: \"John\",\r\n * age: 33,\r\n * married: false,\r\n * }).filter(({ key }) => key !== \"age\");\r\n * ```\r\n */\r\nexport class AoRecord<T extends AoObject> {\r\n\r\n private readonly _entries: T;\r\n\r\n /**\r\n * \r\n * @param defaultEntries The default structure to initialize {@link AoRecord} entries\r\n */\r\n constructor(defaultEntries: T) {\r\n this._entries = defaultEntries;\r\n }\r\n\r\n /**\r\n * @readonly Gets keys of the current entries.\r\n * @returns An array containing keys of the current entries\r\n */\r\n public get keys(): (keyof T)[] {\r\n return Object.keys(this._entries);\r\n }\r\n\r\n /**\r\n * @readonly Gets values of the current entries.\r\n * @returns An array containing values of the current entries\r\n */\r\n public get values(): T[keyof T][] {\r\n return Object.values(this._entries) as T[keyof T][];\r\n }\r\n\r\n /**\r\n * @readonly Gets the current entries.\r\n * @returns An array containing the current entries in form of {@link AoEntryUnion}\r\n */\r\n public get entries(): AoEntryUnion<T>[] {\r\n return Object.entries(this._entries)\r\n .map(e => ({ key: e[0], value: e[1] })) as AoEntryUnion<T>[];\r\n }\r\n\r\n /**\r\n * Filters the current entries based on given condition.\r\n * @param predicate The callback that iterates within {@link AoRecord} entries and\r\n * provides the key and value in form of {@link AoEntryUnion} as parameter and must\r\n * return a boolean type determines whether the current key should be remained in the\r\n * resulting entries or not\r\n * @returns A new instance of {@link AoRecord} containing the {@link Partial} filtered entries.\r\n */\r\n public filter(\r\n predicate: (entry: AoEntryUnion<T>) => boolean\r\n ): AoRecord<AoObject> {\r\n return new AoRecord(aoFilterObject(this._entries, predicate));\r\n }\r\n\r\n /**\r\n * Tests the trueness of the given condition for every entry.\r\n * @param predicate The callback that iterates within {@link AoRecord} entries and\r\n * provides the key and value in form of {@link AoEntryUnion} as parameter and must\r\n * return a boolean type determines the condition for current entry\r\n * @returns True, if the given conditions is true for every entry otherwise false\r\n */\r\n public every(\r\n predicate: (entry: AoEntryUnion<T>) => boolean\r\n ): boolean {\r\n for (const key in this._entries) {\r\n if (!Object.hasOwn(this._entries, key)) continue;\r\n\r\n if (!predicate({ key: key, value: this._entries[key] })) return false;\r\n }\r\n\r\n return true;\r\n }\r\n\r\n /**\r\n * Tests the trueness of the given condition for
|
|
1
|
+
{"version":3,"file":"arabig-origin-record.mjs","sources":["../../../projects/origin/record/record.ts","../../../projects/origin/record/arabig-origin-record.ts"],"sourcesContent":["/**\r\n * @license\r\n * Copyright Salar Arab All Rights Reserved.\r\n * \r\n * @author Salar Arab <salar_arab@outlook.com>\r\n */\r\n\r\nimport { aoFilterObject } from \"@arabig/origin/functions\";\r\nimport { AoEntryUnion, AoObject } from \"@arabig/origin/types\";\r\n\r\n/**\r\n * Utilizes performing common operations as pipeline on object-like.\r\n *\r\n * @remarks\r\n * {@link AoRecord} provides a fluent and type-safe API for manipulating objects.\r\n * It includes methods for filtering, mapping, and transforming key-value pairs—similar to\r\n * array utilities but designed for object semantics.\r\n *\r\n * This class is ideal for scenarios where object-based data structures need to be processed\r\n * functionally, such as configuration maps, lookup tables, or DTO transformations.\r\n *\r\n * @typeParam T - The type of entries contained in the record.\r\n *\r\n * @example\r\n * ```ts\r\n * const rec = new AoRecord({\r\n * name: \"John\",\r\n * age: 33,\r\n * married: false,\r\n * }).filter(({ key }) => key !== \"age\");\r\n * ```\r\n */\r\nexport class AoRecord<T extends AoObject> {\r\n\r\n private readonly _entries: T;\r\n\r\n /**\r\n * \r\n * @param defaultEntries The default structure to initialize {@link AoRecord} entries\r\n */\r\n constructor(defaultEntries: T) {\r\n this._entries = defaultEntries;\r\n }\r\n\r\n /**\r\n * @readonly Gets keys of the current entries.\r\n * @returns An array containing keys of the current entries\r\n */\r\n public get keys(): (keyof T)[] {\r\n return Object.keys(this._entries);\r\n }\r\n\r\n /**\r\n * @readonly Gets values of the current entries.\r\n * @returns An array containing values of the current entries\r\n */\r\n public get values(): T[keyof T][] {\r\n return Object.values(this._entries) as T[keyof T][];\r\n }\r\n\r\n /**\r\n * @readonly Gets the current entries.\r\n * @returns An array containing the current entries in form of {@link AoEntryUnion}\r\n */\r\n public get entries(): AoEntryUnion<T>[] {\r\n return Object.entries(this._entries)\r\n .map(e => ({ key: e[0], value: e[1] })) as AoEntryUnion<T>[];\r\n }\r\n\r\n /**\r\n * Filters the current entries based on given condition.\r\n * @param predicate The callback that iterates within {@link AoRecord} entries and\r\n * provides the key and value in form of {@link AoEntryUnion} as parameter and must\r\n * return a boolean type determines whether the current key should be remained in the\r\n * resulting entries or not\r\n * @returns A new instance of {@link AoRecord} containing the {@link Partial} filtered entries.\r\n */\r\n public filter(\r\n predicate: (entry: AoEntryUnion<T>) => boolean\r\n ): AoRecord<AoObject> {\r\n return new AoRecord(aoFilterObject(this._entries, predicate));\r\n }\r\n\r\n /**\r\n * Tests the trueness of the given condition for every entry.\r\n * @param predicate The callback that iterates within {@link AoRecord} entries and\r\n * provides the key and value in form of {@link AoEntryUnion} as parameter and must\r\n * return a boolean type determines the condition for current entry\r\n * @returns True, if the given conditions is true for every entry otherwise false\r\n */\r\n public every(\r\n predicate: (entry: AoEntryUnion<T>) => boolean\r\n ): boolean {\r\n for (const key in this._entries) {\r\n if (!Object.hasOwn(this._entries, key)) continue;\r\n\r\n if (!predicate({ key: key, value: this._entries[key] })) return false;\r\n }\r\n\r\n return true;\r\n }\r\n\r\n /**\r\n * Tests the trueness of the given condition for at least one entry.\r\n * @param predicate The callback that iterates within {@link AoRecord} entries and\r\n * provides the key and value in form of {@link AoEntryUnion} as parameter and must\r\n * return a boolean type determines the condition for current entry\r\n * @returns True, if the given conditions is true for at least one entry otherwise false\r\n */\r\n public some(\r\n predicate: (entry: AoEntryUnion<T>) => boolean\r\n ): boolean {\r\n for (const key in this._entries) {\r\n if (!Object.hasOwn(this._entries, key)) continue;\r\n\r\n if (predicate({ key: key, value: this._entries[key] })) return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n}","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;AAAA;;;;;AAKG;AAKH;;;;;;;;;;;;;;;;;;;;;AAqBG;MACU,QAAQ,CAAA;AAEF,IAAA,QAAQ;AAEzB;;;AAGG;AACH,IAAA,WAAA,CAAY,cAAiB,EAAA;AAC3B,QAAA,IAAI,CAAC,QAAQ,GAAG,cAAc;IAChC;AAEA;;;AAGG;AACH,IAAA,IAAW,IAAI,GAAA;QACb,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC;IACnC;AAEA;;;AAGG;AACH,IAAA,IAAW,MAAM,GAAA;QACf,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAiB;IACrD;AAEA;;;AAGG;AACH,IAAA,IAAW,OAAO,GAAA;AAChB,QAAA,OAAO,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ;aAChC,GAAG,CAAC,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAsB;IAChE;AAEA;;;;;;;AAOG;AACI,IAAA,MAAM,CACX,SAA8C,EAAA;AAE9C,QAAA,OAAO,IAAI,QAAQ,CAAC,cAAc,CAAC,IAAI,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;IAC/D;AAEA;;;;;;AAMG;AACI,IAAA,KAAK,CACV,SAA8C,EAAA;AAE9C,QAAA,KAAK,MAAM,GAAG,IAAI,IAAI,CAAC,QAAQ,EAAE;YAC/B,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC;gBAAE;AAExC,YAAA,IAAI,CAAC,SAAS,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;AAAE,gBAAA,OAAO,KAAK;QACvE;AAEA,QAAA,OAAO,IAAI;IACb;AAEA;;;;;;AAMG;AACI,IAAA,IAAI,CACT,SAA8C,EAAA;AAE9C,QAAA,KAAK,MAAM,GAAG,IAAI,IAAI,CAAC,QAAQ,EAAE;YAC/B,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC;gBAAE;AAExC,YAAA,IAAI,SAAS,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;AAAE,gBAAA,OAAO,IAAI;QACrE;AAEA,QAAA,OAAO,KAAK;IACd;AAED;;ACzHD;;AAEG;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"arabig-origin-types.mjs","sources":["../../../projects/origin/types/utility.type.ts","../../../projects/origin/types/constant.type.ts","../../../projects/origin/types/checker.type.ts","../../../projects/origin/types/arabig-origin-types.ts"],"sourcesContent":["/**\r\n * @license\r\n * Copyright Salar Arab All Rights Reserved.\r\n * \r\n * @author Salar Arab <salar_arab@outlook.com>\r\n */\r\n\r\n/**\r\n * Represents a union of the given type, `undefined` and `null`.\r\n * @typeParam `T` The type that the union is based on\r\n */\r\nexport type AoNullish<T> = T | null | undefined;\r\n\r\n/**\r\n * Represents a discriminated union of the passed type parameter's possible
|
|
1
|
+
{"version":3,"file":"arabig-origin-types.mjs","sources":["../../../projects/origin/types/utility.type.ts","../../../projects/origin/types/constant.type.ts","../../../projects/origin/types/checker.type.ts","../../../projects/origin/types/arabig-origin-types.ts"],"sourcesContent":["/**\r\n * @license\r\n * Copyright Salar Arab All Rights Reserved.\r\n * \r\n * @author Salar Arab <salar_arab@outlook.com>\r\n */\r\n\r\n/**\r\n * Represents a union of the given type, `undefined` and `null`.\r\n * @typeParam `T` The type that the union is based on\r\n */\r\nexport type AoNullish<T> = T | null | undefined;\r\n\r\n/**\r\n * Represents a discriminated union of the passed type parameter's possible entries\r\n * based on its keys.\r\n * @typeParam `T` The type that the union is based on\r\n */\r\nexport type AoEntryUnion<T> = {\r\n [K in keyof T]: { key: K; value: T[K] }\r\n}[keyof T];\r\n\r\n/**\r\n * Represents a key-value pair in form of a two elements tuple that its first element\r\n * is the key and the second one is the value.\r\n */\r\nexport type AoEntry<T> = [keyof T, T[keyof T]];\r\n\r\n/**\r\n * Represents an `object` with loose or typed structure base on given type parameter.\r\n * @typeParam `T` The type that determines the structure of the resulting `object`.\r\n * If omitted, a complete loose structure will be considered\r\n */\r\nexport type AoObject<T extends Record<any, any> = any> = \r\n T extends any[]\r\n ? never\r\n : T extends (...p: any[]) => any\r\n ? never\r\n : unknown extends T\r\n ? Record<any, any>\r\n : { [K in keyof T]: T[K] };\r\n\r\n/**\r\n * Represents an `object` that includes a loose minimal structure base on passed type\r\n * parameter.\r\n * @typeParam `T` The `object` based that forms the minimal structure, if omitted\r\n * a complete loose structure will be considered\r\n */\r\nexport type AoLooseObject<T extends AoObject = AoObject> = AoObject & T;\r\n\r\n/**\r\n * Represents a `string` literal union of the given `enum` values.\r\n * @typeParam `T`The `enum` type\r\n * @typeParam `TDefault` The type that determines the default case of the `enum` values union\r\n */\r\nexport type AoEnumValue<T extends string, TDefault extends string = never> = `${T}` | TDefault;\r\n\r\n/**\r\n * Represents an optional `string` literal union of the given `enum` values.\r\n * @typeParam `T`The `enum` type\r\n */\r\nexport type AoEnumOptionalValue<T extends string> = `${T}` | String;\r\n\r\n/**\r\n * Represents either a typed union of specific keys or a plain primitive key\r\n * base on given type parameter.\r\n * @typeParam `T` The type that determines the keys union or a primitive key if omitted\r\n */\r\nexport type AoKey<T = unknown> = unknown extends T\r\n ? string | number | symbol\r\n : keyof T;\r\n\r\n/**\r\n * Represents either a typed union of specific keys or a `string` key\r\n * base on given type parameter.\r\n * @typeParam `T` The type that determines the keys union or a string key if omitted\r\n */ \r\nexport type AoStringKey<T = unknown> = unknown extends T\r\n ? string\r\n : Exclude<keyof T, number | symbol>;\r\n\r\n/**\r\n * Represents either a typed union of specific keys or a plain primitive key\r\n * base on given type parameter for all nested types.\r\n * @typeParam `T` The type that determines the keys union or a primitive key if omitted\r\n * @remarks Using this type for deeply nested types can prove slow compilation time.\r\n */\r\nexport type AoDeepKey<T = unknown> = unknown extends T\r\n ? string | number | symbol\r\n : {\r\n [K in keyof T]: T[K] extends object\r\n ? K | AoDeepKey<T[K]>\r\n : K\r\n }[keyof T];\r\n\r\n/**\r\n * Represents either a typed union of specific keys or a `string` key\r\n * base on given type parameter for all nested types.\r\n * @typeParam `T` The type that determines the keys union or a `string` key if omitted\r\n * @remarks Using this type for deeply nested types can prove slow compilation time.\r\n */\r\nexport type AoDeepStringKey<T = unknown> = unknown extends T\r\n ? string\r\n : Exclude<\r\n {\r\n [K in keyof T]: T[K] extends object\r\n ? K | AoDeepKey<T[K]>\r\n : K\r\n }[keyof T], number | symbol\r\n >;","/**\r\n * @license\r\n * Copyright Salar Arab All Rights Reserved.\r\n * \r\n * @author Salar Arab <salar_arab@outlook.com>\r\n */\r\n\r\n/**\r\n * Represents a union of JavaScript primitive data types.\r\n * @see {@link https://developer.mozilla.org/en-US/docs/Glossary/Primitive | Primitive}\r\n */\r\nexport type AoPrimitive = string | number | boolean | bigint | undefined | null | symbol;\r\n\r\n/**\r\n * Represents a union of JavaScript falsy values.\r\n * @see {@link https://developer.mozilla.org/en-US/docs/Glossary/Falsy | Falsy}\r\n */\r\nexport type AoFalsy = undefined | null | false | 0 | -0 | 0n | \"\";\r\n\r\n\r\n/**\r\n * Represents an object that is a CSS declaration block, and exposes style information\r\n * and various style-related methods and properties.\r\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleDeclaration | CSSStyleDeclaration}\r\n */\r\nexport type AoStyle = Partial<CSSStyleDeclaration>;\r\n\r\n/**\r\n * Represents a numeric `string` type\r\n */\r\nexport type AoDigit = `${number}`;\r\n\r\n/**\r\n * Represents a union of the `typeof` keyword result values\r\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof | typeof}\r\n */\r\nexport type AoTypeOf =\r\n | 'string'\r\n | 'number'\r\n | 'boolean'\r\n | 'symbol'\r\n | 'undefined'\r\n | 'object'\r\n | 'function'\r\n | 'bigint';","/**\r\n* @license\r\n* Copyright Agin Company All Rights Reserved\r\n* \r\n* @author Salar Arab <salar.arab.70@gmail.com>\r\n*/\r\n\r\n/**\r\n * Checks whether the passed type is only assignable to a minimal unbound JS `object`.\r\n * @typeParam `T` The type to be checked\r\n */\r\nexport type AoIsObject<T> = T extends \r\n | any[]\r\n | Function\r\n | ((...p: any[]) => any)\r\n ? never\r\n : T extends Record<any, any>\r\n ? T\r\n : never;\r\n\r\n/**\r\n * Checks whether the passed type is only assignable to a minimal unbound JS `array`.\r\n * @typeParam `T` The type to be checked\r\n */\r\nexport type AoIsArray<T> = T extends any[]\r\n ? T\r\n : never;\r\n\r\n/**\r\n * Checks whether the passed type is only assignable to a minimal callable JS `function`.\r\n * @typeParam `T` The type to be checked\r\n */\r\nexport type AoIsFunction<T> = T extends (...p: any[]) => any\r\n ? T\r\n : never;","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"AAAA;;;;;AAKG;;ACLH;;;;;AAKG;;ACLH;;;;;AAKE;;ACLF;;AAEG"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arabig/origin",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"author": {
|
|
5
5
|
"name": "Salar Arab",
|
|
6
6
|
"email": "salar_arab@outlook.com"
|
|
@@ -25,34 +25,35 @@
|
|
|
25
25
|
},
|
|
26
26
|
"sideEffects": false,
|
|
27
27
|
"module": "fesm2022/arabig-origin.mjs",
|
|
28
|
-
"typings": "
|
|
28
|
+
"typings": "types/arabig-origin.d.ts",
|
|
29
29
|
"exports": {
|
|
30
30
|
"./package.json": {
|
|
31
31
|
"default": "./package.json"
|
|
32
32
|
},
|
|
33
33
|
".": {
|
|
34
|
-
"types": "./
|
|
34
|
+
"types": "./types/arabig-origin.d.ts",
|
|
35
35
|
"default": "./fesm2022/arabig-origin.mjs"
|
|
36
36
|
},
|
|
37
37
|
"./functions": {
|
|
38
|
-
"types": "./functions
|
|
38
|
+
"types": "./types/arabig-origin-functions.d.ts",
|
|
39
39
|
"default": "./fesm2022/arabig-origin-functions.mjs"
|
|
40
40
|
},
|
|
41
41
|
"./operand": {
|
|
42
|
-
"types": "./operand
|
|
42
|
+
"types": "./types/arabig-origin-operand.d.ts",
|
|
43
43
|
"default": "./fesm2022/arabig-origin-operand.mjs"
|
|
44
44
|
},
|
|
45
45
|
"./record": {
|
|
46
|
-
"types": "./record
|
|
46
|
+
"types": "./types/arabig-origin-record.d.ts",
|
|
47
47
|
"default": "./fesm2022/arabig-origin-record.mjs"
|
|
48
48
|
},
|
|
49
49
|
"./types": {
|
|
50
|
-
"types": "./types/
|
|
50
|
+
"types": "./types/arabig-origin-types.d.ts",
|
|
51
51
|
"default": "./fesm2022/arabig-origin-types.mjs"
|
|
52
52
|
},
|
|
53
53
|
"./vault": {
|
|
54
|
-
"types": "./vault
|
|
54
|
+
"types": "./types/arabig-origin-vault.d.ts",
|
|
55
55
|
"default": "./fesm2022/arabig-origin-vault.mjs"
|
|
56
56
|
}
|
|
57
|
-
}
|
|
57
|
+
},
|
|
58
|
+
"type": "module"
|
|
58
59
|
}
|
|
@@ -69,11 +69,11 @@ declare class AoRecord<T extends AoObject> {
|
|
|
69
69
|
*/
|
|
70
70
|
every(predicate: (entry: AoEntryUnion<T>) => boolean): boolean;
|
|
71
71
|
/**
|
|
72
|
-
* Tests the trueness of the given condition for
|
|
72
|
+
* Tests the trueness of the given condition for at least one entry.
|
|
73
73
|
* @param predicate The callback that iterates within {@link AoRecord} entries and
|
|
74
74
|
* provides the key and value in form of {@link AoEntryUnion} as parameter and must
|
|
75
75
|
* return a boolean type determines the condition for current entry
|
|
76
|
-
* @returns True, if the given conditions is true for
|
|
76
|
+
* @returns True, if the given conditions is true for at least one entry otherwise false
|
|
77
77
|
*/
|
|
78
78
|
some(predicate: (entry: AoEntryUnion<T>) => boolean): boolean;
|
|
79
79
|
}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
*/
|
|
11
11
|
type AoNullish<T> = T | null | undefined;
|
|
12
12
|
/**
|
|
13
|
-
* Represents a discriminated union of the passed type parameter's possible
|
|
13
|
+
* Represents a discriminated union of the passed type parameter's possible entries
|
|
14
14
|
* based on its keys.
|
|
15
15
|
* @typeParam `T` The type that the union is based on
|
|
16
16
|
*/
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|