Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
397 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@apextoaster/js-utils](./js-utils.md) > [AllowedBufferEncoding](./js-utils.allowedbufferencoding.md) | ||
|
||
## AllowedBufferEncoding type | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
export declare type AllowedBufferEncoding = 'ascii' | 'utf-8'; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@apextoaster/js-utils](./js-utils.md) > [deferValue](./js-utils.defervalue.md) | ||
|
||
## deferValue() function | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
export declare function deferValue<T>(ms: number, val: T): Promise<T>; | ||
``` | ||
|
||
## Parameters | ||
|
||
| Parameter | Type | Description | | ||
| --- | --- | --- | | ||
| ms | number | | | ||
| val | T | | | ||
|
||
<b>Returns:</b> | ||
|
||
Promise<T> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@apextoaster/js-utils](./js-utils.md) > [filterZip](./js-utils.filterzip.md) | ||
|
||
## filterZip() function | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
export declare function filterZip<T1>(cb: (a: T1) => boolean, l1: Array<T1>): Array<T1>; | ||
``` | ||
|
||
## Parameters | ||
|
||
| Parameter | Type | Description | | ||
| --- | --- | --- | | ||
| cb | (a: T1) => boolean | | | ||
| l1 | Array<T1> | | | ||
|
||
<b>Returns:</b> | ||
|
||
Array<T1> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@apextoaster/js-utils](./js-utils.md) > [filterZip](./js-utils.filterzip_1.md) | ||
|
||
## filterZip() function | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
export declare function filterZip<T1, T2>(cb: (a: T1, b: T2) => boolean, l1: Array<T1>, l2: Array<T2>): [Array<T1>, Array<T2>]; | ||
``` | ||
|
||
## Parameters | ||
|
||
| Parameter | Type | Description | | ||
| --- | --- | --- | | ||
| cb | (a: T1, b: T2) => boolean | | | ||
| l1 | Array<T1> | | | ||
| l2 | Array<T2> | | | ||
|
||
<b>Returns:</b> | ||
|
||
\[Array<T1>, Array<T2>\] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@apextoaster/js-utils](./js-utils.md) > [filterZip](./js-utils.filterzip_2.md) | ||
|
||
## filterZip() function | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
export declare function filterZip<T1, T2, T3>(cb: (a: T1, b: T2) => boolean, l1: Array<T1>, l2: Array<T2>, l3: Array<T3>): [Array<T1>, Array<T2>, Array<T3>]; | ||
``` | ||
|
||
## Parameters | ||
|
||
| Parameter | Type | Description | | ||
| --- | --- | --- | | ||
| cb | (a: T1, b: T2) => boolean | | | ||
| l1 | Array<T1> | | | ||
| l2 | Array<T2> | | | ||
| l3 | Array<T3> | | | ||
|
||
<b>Returns:</b> | ||
|
||
\[Array<T1>, Array<T2>, Array<T3>\] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@apextoaster/js-utils](./js-utils.md) > [filterZip](./js-utils.filterzip_3.md) | ||
|
||
## filterZip() function | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
export declare function filterZip<T1, T2, T3, T4>(cb: (a: T1, b: T2) => boolean, l1: Array<T1>, l2: Array<T2>, l3: Array<T3>, l4: Array<T4>): [Array<T1>, Array<T2>, Array<T3>, Array<T4>]; | ||
``` | ||
|
||
## Parameters | ||
|
||
| Parameter | Type | Description | | ||
| --- | --- | --- | | ||
| cb | (a: T1, b: T2) => boolean | | | ||
| l1 | Array<T1> | | | ||
| l2 | Array<T2> | | | ||
| l3 | Array<T3> | | | ||
| l4 | Array<T4> | | | ||
|
||
<b>Returns:</b> | ||
|
||
\[Array<T1>, Array<T2>, Array<T3>, Array<T4>\] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@apextoaster/js-utils](./js-utils.md) > [isArray](./js-utils.isarray.md) | ||
|
||
## isArray() function | ||
|
||
Wrapper for `Array.isArray` with better readonly type handling. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
export declare function isArray<TVal>(list: TVal | Array<TVal>): list is Array<TVal>; | ||
``` | ||
|
||
## Parameters | ||
|
||
| Parameter | Type | Description | | ||
| --- | --- | --- | | ||
| list | TVal \| Array<TVal> | | | ||
|
||
<b>Returns:</b> | ||
|
||
list is Array<TVal> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@apextoaster/js-utils](./js-utils.md) > [isArray](./js-utils.isarray_1.md) | ||
|
||
## isArray() function | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
export declare function isArray<TVal>(list: TVal | ReadonlyArray<TVal>): list is ReadonlyArray<TVal>; | ||
``` | ||
|
||
## Parameters | ||
|
||
| Parameter | Type | Description | | ||
| --- | --- | --- | | ||
| list | TVal \| ReadonlyArray<TVal> | | | ||
|
||
<b>Returns:</b> | ||
|
||
list is ReadonlyArray<TVal> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@apextoaster/js-utils](./js-utils.md) > [isEmpty](./js-utils.isempty.md) | ||
|
||
## isEmpty() function | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
export declare function isEmpty(val: Maybe<Array<unknown> | ReadonlyArray<unknown>>): boolean; | ||
``` | ||
|
||
## Parameters | ||
|
||
| Parameter | Type | Description | | ||
| --- | --- | --- | | ||
| val | [Maybe](./js-utils.maybe.md)<!-- --><Array<unknown> \| ReadonlyArray<unknown>> | | | ||
|
||
<b>Returns:</b> | ||
|
||
boolean | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@apextoaster/js-utils](./js-utils.md) > [mergeArray](./js-utils.mergearray.md) | ||
|
||
## mergeArray() function | ||
|
||
Merge arguments, which may or may not be arrays, into one return that is definitely an array. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
export declare function mergeArray<TItem>(...parts: Array<TItem | Array<TItem>>): Array<TItem>; | ||
``` | ||
|
||
## Parameters | ||
|
||
| Parameter | Type | Description | | ||
| --- | --- | --- | | ||
| parts | Array<TItem \| Array<TItem>> | | | ||
|
||
<b>Returns:</b> | ||
|
||
Array<TItem> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@apextoaster/js-utils](./js-utils.md) > [mergeArray](./js-utils.mergearray_1.md) | ||
|
||
## mergeArray() function | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
export declare function mergeArray<TItem>(...parts: ReadonlyArray<TItem | ReadonlyArray<TItem>>): ReadonlyArray<TItem>; | ||
``` | ||
|
||
## Parameters | ||
|
||
| Parameter | Type | Description | | ||
| --- | --- | --- | | ||
| parts | ReadonlyArray<TItem \| ReadonlyArray<TItem>> | | | ||
|
||
<b>Returns:</b> | ||
|
||
ReadonlyArray<TItem> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@apextoaster/js-utils](./js-utils.md) > [sum](./js-utils.sum.md) | ||
|
||
## sum() function | ||
|
||
Add numbers. | ||
|
||
PredicateR2<!-- --><<!-- -->number, number<!-- -->> | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
export declare function sum(a: number, b: number): number; | ||
``` | ||
|
||
## Parameters | ||
|
||
| Parameter | Type | Description | | ||
| --- | --- | --- | | ||
| a | number | | | ||
| b | number | | | ||
|
||
<b>Returns:</b> | ||
|
||
number | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@apextoaster/js-utils](./js-utils.md) > [toArray](./js-utils.toarray.md) | ||
|
||
## toArray() function | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
export declare function toArray<TVal>(val: Maybe<TVal | Array<TVal>>): Array<TVal>; | ||
``` | ||
|
||
## Parameters | ||
|
||
| Parameter | Type | Description | | ||
| --- | --- | --- | | ||
| val | [Maybe](./js-utils.maybe.md)<!-- --><TVal \| Array<TVal>> | | | ||
|
||
<b>Returns:</b> | ||
|
||
Array<TVal> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@apextoaster/js-utils](./js-utils.md) > [toArray](./js-utils.toarray_1.md) | ||
|
||
## toArray() function | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
export declare function toArray<TVal>(val: Maybe<TVal | ReadonlyArray<TVal>>): ReadonlyArray<TVal>; | ||
``` | ||
|
||
## Parameters | ||
|
||
| Parameter | Type | Description | | ||
| --- | --- | --- | | ||
| val | [Maybe](./js-utils.maybe.md)<!-- --><TVal \| ReadonlyArray<TVal>> | | | ||
|
||
<b>Returns:</b> | ||
|
||
ReadonlyArray<TVal> | ||
|
Oops, something went wrong.