Skip to content

Commit

Permalink
Updates:
Browse files Browse the repository at this point in the history
- Renamed env.getMaxArgumentsLength() to env.maxArgumentsLength()
- Memoized env.getMaxArgumentsLength()
- Refactors env/utils.getMaxArrayLength(). Previous implementation only
worked consistently in Chrome. New implementation works well in Chrome,
Safari, Firefox and Node.
  • Loading branch information
havelessbemore committed Jun 24, 2021
1 parent 02d2e5c commit 983d020
Show file tree
Hide file tree
Showing 40 changed files with 382 additions and 459 deletions.
6 changes: 3 additions & 3 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ The combination of the given elements

#### Defined in

[src/index.ts:23](https://github.com/havelessbemore/dastal/blob/389210e/src/index.ts#L23)
[src/index.ts:23](https://github.com/havelessbemore/dastal/blob/02d2e5c/src/index.ts#L23)

___

Expand Down Expand Up @@ -129,7 +129,7 @@ A function used to determine the order of a set of elements.

#### Defined in

[src/index.ts:35](https://github.com/havelessbemore/dastal/blob/389210e/src/index.ts#L35)
[src/index.ts:35](https://github.com/havelessbemore/dastal/blob/02d2e5c/src/index.ts#L35)

## Functions

Expand All @@ -153,4 +153,4 @@ obj is Collection<unknown\>

#### Defined in

[src/collection/index.ts:12](https://github.com/havelessbemore/dastal/blob/389210e/src/collection/index.ts#L12)
[src/collection/index.ts:12](https://github.com/havelessbemore/dastal/blob/02d2e5c/src/collection/index.ts#L12)
30 changes: 15 additions & 15 deletions docs/classes/aatree.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ Instantiate a tree.

#### Defined in

[src/tree/aaTree.ts:56](https://github.com/havelessbemore/dastal/blob/389210e/src/tree/aaTree.ts#L56)
[src/tree/aaTree.ts:56](https://github.com/havelessbemore/dastal/blob/02d2e5c/src/tree/aaTree.ts#L56)

**new AATree**<T\>(`compareFn`, `allowDuplicates`, `elements?`)

Expand All @@ -97,7 +97,7 @@ Instantiate a tree.

#### Defined in

[src/tree/aaTree.ts:63](https://github.com/havelessbemore/dastal/blob/389210e/src/tree/aaTree.ts#L63)
[src/tree/aaTree.ts:63](https://github.com/havelessbemore/dastal/blob/02d2e5c/src/tree/aaTree.ts#L63)

## Accessors

Expand All @@ -117,7 +117,7 @@ The number of elements in the collection.

#### Defined in

[src/tree/aaTree.ts:183](https://github.com/havelessbemore/dastal/blob/389210e/src/tree/aaTree.ts#L183)
[src/tree/aaTree.ts:183](https://github.com/havelessbemore/dastal/blob/02d2e5c/src/tree/aaTree.ts#L183)

## Methods

Expand All @@ -141,7 +141,7 @@ An iterator through the list

#### Defined in

[src/tree/aaTree.ts:199](https://github.com/havelessbemore/dastal/blob/389210e/src/tree/aaTree.ts#L199)
[src/tree/aaTree.ts:199](https://github.com/havelessbemore/dastal/blob/02d2e5c/src/tree/aaTree.ts#L199)

___

Expand All @@ -167,7 +167,7 @@ Inserts an element into the tree.

#### Defined in

[src/tree/aaTree.ts:87](https://github.com/havelessbemore/dastal/blob/389210e/src/tree/aaTree.ts#L87)
[src/tree/aaTree.ts:87](https://github.com/havelessbemore/dastal/blob/02d2e5c/src/tree/aaTree.ts#L87)

___

Expand All @@ -187,7 +187,7 @@ Removes all elements.

#### Defined in

[src/tree/aaTree.ts:117](https://github.com/havelessbemore/dastal/blob/389210e/src/tree/aaTree.ts#L117)
[src/tree/aaTree.ts:117](https://github.com/havelessbemore/dastal/blob/02d2e5c/src/tree/aaTree.ts#L117)

___

Expand All @@ -205,7 +205,7 @@ ___

#### Defined in

[src/tree/aaTree.ts:122](https://github.com/havelessbemore/dastal/blob/389210e/src/tree/aaTree.ts#L122)
[src/tree/aaTree.ts:122](https://github.com/havelessbemore/dastal/blob/02d2e5c/src/tree/aaTree.ts#L122)

___

Expand All @@ -231,7 +231,7 @@ Delete an element from the tree.

#### Defined in

[src/tree/aaTree.ts:126](https://github.com/havelessbemore/dastal/blob/389210e/src/tree/aaTree.ts#L126)
[src/tree/aaTree.ts:126](https://github.com/havelessbemore/dastal/blob/02d2e5c/src/tree/aaTree.ts#L126)

___

Expand All @@ -257,7 +257,7 @@ Check if an element is in the tree.

#### Defined in

[src/tree/aaTree.ts:139](https://github.com/havelessbemore/dastal/blob/389210e/src/tree/aaTree.ts#L139)
[src/tree/aaTree.ts:139](https://github.com/havelessbemore/dastal/blob/02d2e5c/src/tree/aaTree.ts#L139)

___

Expand All @@ -277,7 +277,7 @@ Get the maximum element.

#### Defined in

[src/tree/aaTree.ts:143](https://github.com/havelessbemore/dastal/blob/389210e/src/tree/aaTree.ts#L143)
[src/tree/aaTree.ts:143](https://github.com/havelessbemore/dastal/blob/02d2e5c/src/tree/aaTree.ts#L143)

___

Expand All @@ -297,7 +297,7 @@ Get the minimum element.

#### Defined in

[src/tree/aaTree.ts:147](https://github.com/havelessbemore/dastal/blob/389210e/src/tree/aaTree.ts#L147)
[src/tree/aaTree.ts:147](https://github.com/havelessbemore/dastal/blob/02d2e5c/src/tree/aaTree.ts#L147)

___

Expand All @@ -317,7 +317,7 @@ Remove the maximum element.

#### Defined in

[src/tree/aaTree.ts:151](https://github.com/havelessbemore/dastal/blob/389210e/src/tree/aaTree.ts#L151)
[src/tree/aaTree.ts:151](https://github.com/havelessbemore/dastal/blob/02d2e5c/src/tree/aaTree.ts#L151)

___

Expand All @@ -337,7 +337,7 @@ Remove the minimum element.

#### Defined in

[src/tree/aaTree.ts:167](https://github.com/havelessbemore/dastal/blob/389210e/src/tree/aaTree.ts#L167)
[src/tree/aaTree.ts:167](https://github.com/havelessbemore/dastal/blob/02d2e5c/src/tree/aaTree.ts#L167)

___

Expand All @@ -359,7 +359,7 @@ Iterate through the tree in sorted order (i.e in-order traversal).

#### Defined in

[src/tree/aaTree.ts:187](https://github.com/havelessbemore/dastal/blob/389210e/src/tree/aaTree.ts#L187)
[src/tree/aaTree.ts:187](https://github.com/havelessbemore/dastal/blob/02d2e5c/src/tree/aaTree.ts#L187)

___

Expand All @@ -386,4 +386,4 @@ Update a specific element.

#### Defined in

[src/tree/aaTree.ts:205](https://github.com/havelessbemore/dastal/blob/389210e/src/tree/aaTree.ts#L205)
[src/tree/aaTree.ts:205](https://github.com/havelessbemore/dastal/blob/02d2e5c/src/tree/aaTree.ts#L205)
50 changes: 25 additions & 25 deletions docs/classes/arraylist.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Instantiate the list.

#### Defined in

[src/list/arrayList.ts:13](https://github.com/havelessbemore/dastal/blob/389210e/src/list/arrayList.ts#L13)
[src/list/arrayList.ts:13](https://github.com/havelessbemore/dastal/blob/02d2e5c/src/list/arrayList.ts#L13)

## Accessors

Expand All @@ -90,7 +90,7 @@ The number of elements in the collection.

#### Defined in

[src/list/arrayList.ts:113](https://github.com/havelessbemore/dastal/blob/389210e/src/list/arrayList.ts#L113)
[src/list/arrayList.ts:113](https://github.com/havelessbemore/dastal/blob/02d2e5c/src/list/arrayList.ts#L113)

## Methods

Expand All @@ -114,7 +114,7 @@ An iterator through the list

#### Defined in

[src/list/arrayList.ts:136](https://github.com/havelessbemore/dastal/blob/389210e/src/list/arrayList.ts#L136)
[src/list/arrayList.ts:136](https://github.com/havelessbemore/dastal/blob/02d2e5c/src/list/arrayList.ts#L136)

___

Expand All @@ -141,7 +141,7 @@ Add the element at the specified index.

#### Defined in

[src/list/arrayList.ts:23](https://github.com/havelessbemore/dastal/blob/389210e/src/list/arrayList.ts#L23)
[src/list/arrayList.ts:23](https://github.com/havelessbemore/dastal/blob/02d2e5c/src/list/arrayList.ts#L23)

___

Expand All @@ -168,7 +168,7 @@ Add elements at the specified index.

#### Defined in

[src/list/arrayList.ts:30](https://github.com/havelessbemore/dastal/blob/389210e/src/list/arrayList.ts#L30)
[src/list/arrayList.ts:30](https://github.com/havelessbemore/dastal/blob/02d2e5c/src/list/arrayList.ts#L30)

___

Expand All @@ -188,7 +188,7 @@ Removes all elements.

#### Defined in

[src/list/arrayList.ts:37](https://github.com/havelessbemore/dastal/blob/389210e/src/list/arrayList.ts#L37)
[src/list/arrayList.ts:37](https://github.com/havelessbemore/dastal/blob/02d2e5c/src/list/arrayList.ts#L37)

___

Expand All @@ -214,7 +214,7 @@ Combines the list with multiple iterables into a new list. Does not modify the e

#### Defined in

[src/list/arrayList.ts:41](https://github.com/havelessbemore/dastal/blob/389210e/src/list/arrayList.ts#L41)
[src/list/arrayList.ts:41](https://github.com/havelessbemore/dastal/blob/02d2e5c/src/list/arrayList.ts#L41)

___

Expand Down Expand Up @@ -248,7 +248,7 @@ the copied sequence will be trimmed to fit list.size

#### Defined in

[src/list/arrayList.ts:49](https://github.com/havelessbemore/dastal/blob/389210e/src/list/arrayList.ts#L49)
[src/list/arrayList.ts:49](https://github.com/havelessbemore/dastal/blob/02d2e5c/src/list/arrayList.ts#L49)

___

Expand Down Expand Up @@ -279,7 +279,7 @@ end of the list. For example, -2 refers to the second to last element of the lis

#### Defined in

[src/list/arrayList.ts:57](https://github.com/havelessbemore/dastal/blob/389210e/src/list/arrayList.ts#L57)
[src/list/arrayList.ts:57](https://github.com/havelessbemore/dastal/blob/02d2e5c/src/list/arrayList.ts#L57)

___

Expand All @@ -305,7 +305,7 @@ Return the element at the specified index.

#### Defined in

[src/list/arrayList.ts:64](https://github.com/havelessbemore/dastal/blob/389210e/src/list/arrayList.ts#L64)
[src/list/arrayList.ts:64](https://github.com/havelessbemore/dastal/blob/02d2e5c/src/list/arrayList.ts#L64)

___

Expand All @@ -332,7 +332,7 @@ Update the element at the specified index.

#### Defined in

[src/list/arrayList.ts:68](https://github.com/havelessbemore/dastal/blob/389210e/src/list/arrayList.ts#L68)
[src/list/arrayList.ts:68](https://github.com/havelessbemore/dastal/blob/02d2e5c/src/list/arrayList.ts#L68)

___

Expand All @@ -352,7 +352,7 @@ Retrieves and removes the end of the list.

#### Defined in

[src/list/arrayList.ts:77](https://github.com/havelessbemore/dastal/blob/389210e/src/list/arrayList.ts#L77)
[src/list/arrayList.ts:77](https://github.com/havelessbemore/dastal/blob/02d2e5c/src/list/arrayList.ts#L77)

___

Expand All @@ -378,7 +378,7 @@ Inserts the specified value into the end of the list

#### Defined in

[src/list/arrayList.ts:81](https://github.com/havelessbemore/dastal/blob/389210e/src/list/arrayList.ts#L81)
[src/list/arrayList.ts:81](https://github.com/havelessbemore/dastal/blob/02d2e5c/src/list/arrayList.ts#L81)

___

Expand Down Expand Up @@ -407,7 +407,7 @@ end of the list. For example, -2 refers to the second to last element of the lis

#### Defined in

[src/list/arrayList.ts:85](https://github.com/havelessbemore/dastal/blob/389210e/src/list/arrayList.ts#L85)
[src/list/arrayList.ts:85](https://github.com/havelessbemore/dastal/blob/02d2e5c/src/list/arrayList.ts#L85)

___

Expand Down Expand Up @@ -437,7 +437,7 @@ end of the list. For example, -2 refers to the second to last element of the lis

#### Defined in

[src/list/arrayList.ts:89](https://github.com/havelessbemore/dastal/blob/389210e/src/list/arrayList.ts#L89)
[src/list/arrayList.ts:89](https://github.com/havelessbemore/dastal/blob/02d2e5c/src/list/arrayList.ts#L89)

___

Expand All @@ -464,7 +464,7 @@ Update the element at the specified index.

#### Defined in

[src/list/arrayList.ts:100](https://github.com/havelessbemore/dastal/blob/389210e/src/list/arrayList.ts#L100)
[src/list/arrayList.ts:100](https://github.com/havelessbemore/dastal/blob/02d2e5c/src/list/arrayList.ts#L100)

___

Expand All @@ -484,7 +484,7 @@ Retrieves and removes the first element in the list.

#### Defined in

[src/list/arrayList.ts:109](https://github.com/havelessbemore/dastal/blob/389210e/src/list/arrayList.ts#L109)
[src/list/arrayList.ts:109](https://github.com/havelessbemore/dastal/blob/02d2e5c/src/list/arrayList.ts#L109)

___

Expand Down Expand Up @@ -514,7 +514,7 @@ end of the list. For example, -2 refers to the second to last element of the lis

#### Defined in

[src/list/arrayList.ts:117](https://github.com/havelessbemore/dastal/blob/389210e/src/list/arrayList.ts#L117)
[src/list/arrayList.ts:117](https://github.com/havelessbemore/dastal/blob/02d2e5c/src/list/arrayList.ts#L117)

___

Expand All @@ -540,7 +540,7 @@ Sorts the elements in place.

#### Defined in

[src/list/arrayList.ts:125](https://github.com/havelessbemore/dastal/blob/389210e/src/list/arrayList.ts#L125)
[src/list/arrayList.ts:125](https://github.com/havelessbemore/dastal/blob/02d2e5c/src/list/arrayList.ts#L125)

___

Expand Down Expand Up @@ -569,7 +569,7 @@ Returns any deleted elements.

#### Defined in

[src/list/arrayList.ts:121](https://github.com/havelessbemore/dastal/blob/389210e/src/list/arrayList.ts#L121)
[src/list/arrayList.ts:121](https://github.com/havelessbemore/dastal/blob/02d2e5c/src/list/arrayList.ts#L121)

___

Expand All @@ -595,7 +595,7 @@ Inserts the specified value into the front of the list

#### Defined in

[src/list/arrayList.ts:140](https://github.com/havelessbemore/dastal/blob/389210e/src/list/arrayList.ts#L140)
[src/list/arrayList.ts:140](https://github.com/havelessbemore/dastal/blob/02d2e5c/src/list/arrayList.ts#L140)

___

Expand All @@ -621,7 +621,7 @@ Update the elements of the list

#### Defined in

[src/list/arrayList.ts:144](https://github.com/havelessbemore/dastal/blob/389210e/src/list/arrayList.ts#L144)
[src/list/arrayList.ts:144](https://github.com/havelessbemore/dastal/blob/02d2e5c/src/list/arrayList.ts#L144)

**update**(`min`, `callback`): [ArrayList](arraylist.md)<T\>

Expand All @@ -647,7 +647,7 @@ end of the list. For example, -2 refers to the second to last element of the lis

#### Defined in

[src/list/arrayList.ts:145](https://github.com/havelessbemore/dastal/blob/389210e/src/list/arrayList.ts#L145)
[src/list/arrayList.ts:145](https://github.com/havelessbemore/dastal/blob/02d2e5c/src/list/arrayList.ts#L145)

**update**(`min`, `max`, `callback`): [ArrayList](arraylist.md)<T\>

Expand All @@ -674,7 +674,7 @@ end of the list. For example, -2 refers to the second to last element of the lis

#### Defined in

[src/list/arrayList.ts:146](https://github.com/havelessbemore/dastal/blob/389210e/src/list/arrayList.ts#L146)
[src/list/arrayList.ts:146](https://github.com/havelessbemore/dastal/blob/02d2e5c/src/list/arrayList.ts#L146)

___

Expand Down Expand Up @@ -706,4 +706,4 @@ end of the list. For example, -2 refers to the second to last element of the lis

#### Defined in

[src/list/arrayList.ts:174](https://github.com/havelessbemore/dastal/blob/389210e/src/list/arrayList.ts#L174)
[src/list/arrayList.ts:174](https://github.com/havelessbemore/dastal/blob/02d2e5c/src/list/arrayList.ts#L174)
Loading

0 comments on commit 983d020

Please sign in to comment.