Skip to content

Commit

Permalink
fix: export missing symbols
Browse files Browse the repository at this point in the history
  • Loading branch information
ssube committed Aug 1, 2021
1 parent e18f65a commit 52e0822
Show file tree
Hide file tree
Showing 23 changed files with 397 additions and 20 deletions.
11 changes: 11 additions & 0 deletions docs/api/js-utils.allowedbufferencoding.md
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@apextoaster/js-utils](./js-utils.md) &gt; [AllowedBufferEncoding](./js-utils.allowedbufferencoding.md)

## AllowedBufferEncoding type

<b>Signature:</b>

```typescript
export declare type AllowedBufferEncoding = 'ascii' | 'utf-8';
```
23 changes: 23 additions & 0 deletions docs/api/js-utils.defervalue.md
@@ -0,0 +1,23 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@apextoaster/js-utils](./js-utils.md) &gt; [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&lt;T&gt;

2 changes: 1 addition & 1 deletion docs/api/js-utils.encode.md
Expand Up @@ -17,7 +17,7 @@ export declare function encode(chunks: Array<Buffer>, encoding: AllowedBufferEnc
| Parameter | Type | Description |
| --- | --- | --- |
| chunks | Array&lt;Buffer&gt; | |
| encoding | AllowedBufferEncoding | |
| encoding | [AllowedBufferEncoding](./js-utils.allowedbufferencoding.md) | |

<b>Returns:</b>

Expand Down
23 changes: 23 additions & 0 deletions docs/api/js-utils.filterzip.md
@@ -0,0 +1,23 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@apextoaster/js-utils](./js-utils.md) &gt; [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) =&gt; boolean | |
| l1 | Array&lt;T1&gt; | |

<b>Returns:</b>

Array&lt;T1&gt;

24 changes: 24 additions & 0 deletions docs/api/js-utils.filterzip_1.md
@@ -0,0 +1,24 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@apextoaster/js-utils](./js-utils.md) &gt; [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) =&gt; boolean | |
| l1 | Array&lt;T1&gt; | |
| l2 | Array&lt;T2&gt; | |

<b>Returns:</b>

\[Array&lt;T1&gt;, Array&lt;T2&gt;\]

25 changes: 25 additions & 0 deletions docs/api/js-utils.filterzip_2.md
@@ -0,0 +1,25 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@apextoaster/js-utils](./js-utils.md) &gt; [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) =&gt; boolean | |
| l1 | Array&lt;T1&gt; | |
| l2 | Array&lt;T2&gt; | |
| l3 | Array&lt;T3&gt; | |

<b>Returns:</b>

\[Array&lt;T1&gt;, Array&lt;T2&gt;, Array&lt;T3&gt;\]

26 changes: 26 additions & 0 deletions docs/api/js-utils.filterzip_3.md
@@ -0,0 +1,26 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@apextoaster/js-utils](./js-utils.md) &gt; [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) =&gt; boolean | |
| l1 | Array&lt;T1&gt; | |
| l2 | Array&lt;T2&gt; | |
| l3 | Array&lt;T3&gt; | |
| l4 | Array&lt;T4&gt; | |

<b>Returns:</b>

\[Array&lt;T1&gt;, Array&lt;T2&gt;, Array&lt;T3&gt;, Array&lt;T4&gt;\]

24 changes: 24 additions & 0 deletions docs/api/js-utils.isarray.md
@@ -0,0 +1,24 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@apextoaster/js-utils](./js-utils.md) &gt; [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&lt;TVal&gt; | |

<b>Returns:</b>

list is Array&lt;TVal&gt;

22 changes: 22 additions & 0 deletions docs/api/js-utils.isarray_1.md
@@ -0,0 +1,22 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@apextoaster/js-utils](./js-utils.md) &gt; [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&lt;TVal&gt; | |

<b>Returns:</b>

list is ReadonlyArray&lt;TVal&gt;

22 changes: 22 additions & 0 deletions docs/api/js-utils.isempty.md
@@ -0,0 +1,22 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@apextoaster/js-utils](./js-utils.md) &gt; [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)<!-- -->&lt;Array&lt;unknown&gt; \| ReadonlyArray&lt;unknown&gt;&gt; | |

<b>Returns:</b>

boolean

15 changes: 15 additions & 0 deletions docs/api/js-utils.md
Expand Up @@ -31,11 +31,16 @@
| [constructorName(val)](./js-utils.constructorname.md) | Get the constructor name from an instance. |
| [defaultWhen(condition, items)](./js-utils.defaultwhen.md) | Return the first element when <code>condition</code> is true and the second element when <code>condition</code> is false. |
| [defer(ms)](./js-utils.defer.md) | Resolve after a set amount of time. |
| [deferValue(ms, val)](./js-utils.defervalue.md) | |
| [doesExist(val)](./js-utils.doesexist.md) | Check if a variable is some <code>T</code>. |
| [encode(chunks, encoding)](./js-utils.encode.md) | Concatenate then encode a list of buffers. |
| [ensureArray(val)](./js-utils.ensurearray.md) | |
| [ensureArray(val)](./js-utils.ensurearray_1.md) | |
| [entriesOf(map)](./js-utils.entriesof.md) | Get entries of a map-like. |
| [filterZip(cb, l1)](./js-utils.filterzip.md) | |
| [filterZip(cb, l1, l2)](./js-utils.filterzip_1.md) | |
| [filterZip(cb, l1, l2, l3)](./js-utils.filterzip_2.md) | |
| [filterZip(cb, l1, l2, l3, l4)](./js-utils.filterzip_3.md) | |
| [getConstructor(val)](./js-utils.getconstructor.md) | Get the constructor from an instance. |
| [getHead(map, key)](./js-utils.gethead.md) | Get the first element from the specified key within a map of lists. |
| [getHeadOrDefault(map, key, defaultValue)](./js-utils.getheadordefault.md) | Get the first element from the specified key, within a map of lists, or a default value when the key does not exist or is nil. |
Expand All @@ -44,14 +49,19 @@
| [getTestLogger(verbose)](./js-utils.gettestlogger.md) | Get a test logger. Returns a null logger unless <code>verbose</code> is true or run under debug mode. |
| [hasItems(val)](./js-utils.hasitems.md) | Test if a value is an array with some items (length &gt; 0).<!-- -->This is not a general replacement for <code>.length &gt; 0</code>, since it is also a typeguard: <code>if (hasItems(val)) else { val }</code> will complain that <code>val</code> is <code>never</code> in the <code>else</code> branch, since it was proven not to be an array by this function, even if <code>val</code> is simply empty. |
| [hasItems(val)](./js-utils.hasitems_1.md) | |
| [isArray(list)](./js-utils.isarray.md) | Wrapper for <code>Array.isArray</code> with better readonly type handling. |
| [isArray(list)](./js-utils.isarray_1.md) | |
| [isDebug()](./js-utils.isdebug.md) | Test if DEBUG mode is set.<!-- -->TODO: check variable value as well |
| [isEmpty(val)](./js-utils.isempty.md) | |
| [isNil(val)](./js-utils.isnil.md) | Check if a value is nil. |
| [isNone(val)](./js-utils.isnone.md) | |
| [isSome(val)](./js-utils.issome.md) | |
| [leftPad(val, min, fill)](./js-utils.leftpad.md) | |
| [lengthOf(val)](./js-utils.lengthof.md) | Calculate the length of an array or value.<!-- -->Arrays return their length, single values return 1, and nil values return 0. This counts the number of elements that setOrPush would add. |
| [makeDict(map)](./js-utils.makedict.md) | Turns a map or dict into a dict |
| [makeMap(val)](./js-utils.makemap.md) | Clone a map or map-like object into a new map. |
| [mergeArray(parts)](./js-utils.mergearray.md) | Merge arguments, which may or may not be arrays, into one return that is definitely an array. |
| [mergeArray(parts)](./js-utils.mergearray_1.md) | |
| [mergeArrays(parts)](./js-utils.mergearrays.md) | |
| [mergeArrays(parts)](./js-utils.mergearrays_1.md) | |
| [mergeMap(target, source)](./js-utils.mergemap.md) | Merge the <code>source</code> map into the <code>target</code> map, replacing keys that already exist. |
Expand All @@ -68,8 +78,12 @@
| [setOrPush(map, key, val)](./js-utils.setorpush.md) | Set a map key to a new array or push to the existing value. |
| [signal(signals)](./js-utils.signal.md) | |
| [spyLogger(spies)](./js-utils.spylogger.md) | Create a spy logger using the provided methods, which returns itself as a child. |
| [sum(a, b)](./js-utils.sum.md) | Add numbers. PredicateR2<!-- -->&lt;<!-- -->number, number<!-- -->&gt; |
| [timeout(ms, oper)](./js-utils.timeout.md) | Reject after a set amount of time if the original promise has not yet resolved. |
| [toArray(val)](./js-utils.toarray.md) | |
| [toArray(val)](./js-utils.toarray_1.md) | |
| [trim(val, max, tail)](./js-utils.trim.md) | |
| [waitFor(cb, step, count)](./js-utils.waitfor.md) | Reject after a set number of attempts if the given predicate does not return true. |
| [waitForChild(child)](./js-utils.waitforchild.md) | Wait for a child process to exit, collecting output, errors, and exit status. |
| [writeValue(stream, value)](./js-utils.writevalue.md) | |

Expand All @@ -96,6 +110,7 @@

| Type Alias | Description |
| --- | --- |
| [AllowedBufferEncoding](./js-utils.allowedbufferencoding.md) | |
| [ChildSpawner](./js-utils.childspawner.md) | |
| [MapLike](./js-utils.maplike.md) | A <code>Map</code> or dictionary object with string keys and <code>TVal</code> values. |
| [Maybe](./js-utils.maybe.md) | Value that may be nil. |
Expand Down
24 changes: 24 additions & 0 deletions docs/api/js-utils.mergearray.md
@@ -0,0 +1,24 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@apextoaster/js-utils](./js-utils.md) &gt; [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&lt;TItem \| Array&lt;TItem&gt;&gt; | |

<b>Returns:</b>

Array&lt;TItem&gt;

22 changes: 22 additions & 0 deletions docs/api/js-utils.mergearray_1.md
@@ -0,0 +1,22 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@apextoaster/js-utils](./js-utils.md) &gt; [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&lt;TItem \| ReadonlyArray&lt;TItem&gt;&gt; | |

<b>Returns:</b>

ReadonlyArray&lt;TItem&gt;

27 changes: 27 additions & 0 deletions docs/api/js-utils.sum.md
@@ -0,0 +1,27 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@apextoaster/js-utils](./js-utils.md) &gt; [sum](./js-utils.sum.md)

## sum() function

Add numbers.

PredicateR2<!-- -->&lt;<!-- -->number, number<!-- -->&gt;

<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

22 changes: 22 additions & 0 deletions docs/api/js-utils.toarray.md
@@ -0,0 +1,22 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@apextoaster/js-utils](./js-utils.md) &gt; [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)<!-- -->&lt;TVal \| Array&lt;TVal&gt;&gt; | |

<b>Returns:</b>

Array&lt;TVal&gt;

22 changes: 22 additions & 0 deletions docs/api/js-utils.toarray_1.md
@@ -0,0 +1,22 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@apextoaster/js-utils](./js-utils.md) &gt; [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)<!-- -->&lt;TVal \| ReadonlyArray&lt;TVal&gt;&gt; | |

<b>Returns:</b>

ReadonlyArray&lt;TVal&gt;

0 comments on commit 52e0822

Please sign in to comment.