diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 020c6a1ef..000000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,81 +0,0 @@ -name: CI -on: - push: - branches: - - main - - master - tags: - - '!*' # Do not execute on tags -env: - NAME: ${{vars.NAME}} - EMAIL: ${{vars.EMAIL}} - NPM_TOKEN: ${{secrets.NPM_TOKEN}} - GITHUB_TOKEN: ${{secrets.GH_TOKEN}} - CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}} - FORCE_COLOR: 1 - - -jobs: - test: - strategy: - matrix: - platform: [ubuntu-latest, windows-latest, macOS-latest] - node: [20.x, 22.x] - name: Test with Node ${{matrix.node}} on ${{matrix.platform}} - runs-on: ${{matrix.platform}} - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v3 - with: - node-version: ${{matrix.node}} - - run: npm ci - - run: npm test - - - coverage: - name: Publish coverage - needs: [test] - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v3 - with: - node-version: 22.x - - run: npm ci - - run: npm test - - uses: paambaati/codeclimate-action@v3.0.0 - - uses: coverallsapp/github-action@master - with: - github-token: ${{secrets.GITHUB_TOKEN}} - - - docs: - name: Publish docs - needs: [test] - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v3 - with: - node-version: 22.x - - uses: nodef/git-config.action@v1.0.0 - - run: npm i -g typescript typedoc - - run: npm ci - - run: npm run publish-docs - - - packages: - name: Publish packages - needs: [test] - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v3 - with: - node-version: 22.x - - uses: nodef/npm-config.action@v1.0.0 - with: - entries: access = public - - run: npm i -g typescript rollup typedoc browserify terser - - run: npm ci - - run: npm run publish-packages diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml deleted file mode 100644 index f3c6028df..000000000 --- a/.github/workflows/pr.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: PR -on: [pull_request] -env: - FORCE_COLOR: 1 - - -jobs: - test: - strategy: - matrix: - platform: [ubuntu-latest, windows-latest, macOS-latest] - node: [20.x, 22.x] - name: Test with Node ${{ matrix.node }} on ${{ matrix.platform }} - runs-on: ${{ matrix.platform }} - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node }} - - run: npm ci - - run: npm test diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 99d88d7e0..000000000 --- a/.gitignore +++ /dev/null @@ -1,71 +0,0 @@ -# Generated files -.build/ -.docs/ -coverage/ -*.d.ts -*.map -example.js -index.js -index.?js - -# Logs -logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -# Runtime data -pids -*.pid -*.seed -*.pid.lock - -# Directory for instrumented libs generated by jscoverage/JSCover -lib-cov - -# Coverage directory used by tools like istanbul -coverage - -# nyc test coverage -.nyc_output - -# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) -.grunt - -# Bower dependency directory (https://bower.io/) -bower_components - -# node-waf configuration -.lock-wscript - -# Compiled binary addons (https://nodejs.org/api/addons.html) -build/Release - -# Dependency directories -node_modules/ -jspm_packages/ - -# TypeScript v1 declaration files -typings/ - -# Optional npm cache directory -.npm - -# Optional eslint cache -.eslintcache - -# Optional REPL history -.node_repl_history - -# Output of 'npm pack' -*.tgz - -# Yarn Integrity file -.yarn-integrity - -# dotenv environment variables file -.env - -# next.js build output -.next diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index a8bab4f06..000000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "wiki"] - path = wiki - url = https://github.com/nodef/extra-array.wiki diff --git a/.npmignore b/.npmignore deleted file mode 100644 index b8f220bb3..000000000 --- a/.npmignore +++ /dev/null @@ -1,22 +0,0 @@ -# Source only -.gitmodules -.github/ -.docs/ -src/ -data/ -wiki/ -tests/ -unused/ -test.js -CITATION.cff -TODO - -# Build -.build/ -coverage/ -.travis.yml -.coveralls.yml -tsconfig.json -jest.config.js -rollup.config.js -build.js diff --git a/CITATION.cff b/CITATION.cff deleted file mode 100644 index ecc1dc4b0..000000000 --- a/CITATION.cff +++ /dev/null @@ -1,10 +0,0 @@ -cff-version: 1.2.0 -message: "If you use this software, please cite it as below." -authors: - - family-names: Sahu - given-names: Subhajit - orcid: https://orcid.org/0000-0001-5140-6578 -title: "nodef/extra-array: An array is a collection of values, stored contiguously." -version: 4.1.15 -doi: 10.5281/zenodo.7913300 -date-released: 2023-05-09 diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 87093a9fe..000000000 --- a/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2018-25 Subhajit Sahu - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/README.md b/README.md deleted file mode 100644 index e5febb4fb..000000000 --- a/README.md +++ /dev/null @@ -1,508 +0,0 @@ -An [array] is a collection of values, stored contiguously.
-📦 [Node.js](https://www.npmjs.com/package/extra-array), -🌐 [Web](https://www.npmjs.com/package/extra-array.web), -📜 [Files](https://unpkg.com/extra-array/), -📰 [Docs](https://nodef.github.io/extra-array/), -📘 [Wiki](https://github.com/nodef/extra-array/wiki/). - -
- - -This package includes comprehensive set of array functions with which you can -**generate** an array, **clone** it, query **about** it, get non-negative -**indices**, manage its **length**, **get/set** elements, fully or partially -**sort** it, obtain **minimum(s)/maximum(s)**, **compare** it with another -array, get a **part** of it, **search a value**, obtain all possible -**arrangements** or **random arrangements**, **find** an element, **take/drop** -elements or **scan** from its beginning or its end, **search** the index of a -part of it, perform **functional** operations, **flatten** multi-level arrays, -obtain **prefix sum**, **manipulate** it in various ways, **count/partition** -elements, **split** it, **concatenate/join** multiple arrays, **rearrange** -elements within it, or performing **set operations** upon it. - -We use a consistent naming scheme that helps you quickly identify the functions -you need. All functions except `from*()` take array as 1st parameter. Some -functions operate on a specified range in the array and are called `ranged*()`, -such as `rangedPartialSort()`. Functions like `swap()` are pure and do not -modify the array itself, while functions like `swap$()` *do modify (update)* the -array itself. Some functions accept a map function for *faster comparison*, such -as `unique()`. Further, functions which return an iterable instead of an array -are prefixed with `i`, such as `isubsequences()`. We borrow some names from -other programming languages such as *Haskell*, *Python*, *Java*, and -*Processing*. - -With this package, you can simplify the implementation of complex algorithms, -and be able to achieve your goals faster, regardless of your level of expertise. -Try it out today and discover how it can transform your development experience! -This package is available in *Node.js* and *Web* formats. To use it on the web, -simply use the `extra_array` global variable after loading with a `
+
+ +
+
+
+
+ +

Function adjacentCombine

+
+
    + +
  • +

    Combine adjacent values of an array.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      fc: CombineFunction<T>
      +

      combine function (u, v)

      +
      +
    • +
    • +
      acc: T
      +

      initial value

      +
      +
    +

    Returns T[]

    [fc(acc, v₀), fc(v₀, v₁)...] | vᵢ ∈ x

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/adjacentCombine_.html b/functions/adjacentCombine_.html new file mode 100644 index 000000000..a7aed1dc6 --- /dev/null +++ b/functions/adjacentCombine_.html @@ -0,0 +1,333 @@ +adjacentCombine$ | extra-array
+
+ +
+
+
+
+ +

Function adjacentCombine$

+
+
    + +
  • +

    Combine adjacent values of an array!

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array (updated!)

      +
      +
    • +
    • +
      fc: CombineFunction<T>
      +

      combine function (u, v)

      +
      +
    • +
    • +
      acc: T
      +

      initial value

      +
      +
    +

    Returns T[]

    x = [fc(acc, v₀), fc(v₀, v₁)...] | vᵢ ∈ x

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/cartesianProduct.html b/functions/cartesianProduct.html new file mode 100644 index 000000000..9bc1a499b --- /dev/null +++ b/functions/cartesianProduct.html @@ -0,0 +1,330 @@ +cartesianProduct | extra-array
+
+ +
+
+
+
+ +

Function cartesianProduct

+
+
    + +
  • +

    Obtain cartesian product of arrays.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    • +
    • +

      U = T

    +
    +

    Parameters

    +
      +
    • +
      xs: T[][]
      +

      arrays

      +
      +
    • +
    • +
      fm: MapFunction<T[], U | T[]> = null
      +

      map function (vs, i)

      +
      +
    +

    Returns (T[] | U)[]

    x₀ × x₁ × ... = {[v₀, v₁, ...] | v₀ ∈ x₀, v₁ ∈ x₁, ...] }

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/chunk.html b/functions/chunk.html new file mode 100644 index 000000000..562b87a13 --- /dev/null +++ b/functions/chunk.html @@ -0,0 +1,333 @@ +chunk | extra-array
+
+ +
+
+
+
+ +

Function chunk

+
+
    + +
  • +

    Break array into chunks of given size.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      n: number = 1
      +

      chunk size [1]

      +
      +
    • +
    • +
      s: number = n
      +

      chunk step [n]

      +
      +
    +

    Returns T[][]

    x[0..n] ⧺ x[s..s+n] ⧺ x[2s..2s+n] ⧺ ...

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/clear_.html b/functions/clear_.html new file mode 100644 index 000000000..35c06d2c6 --- /dev/null +++ b/functions/clear_.html @@ -0,0 +1,323 @@ +clear$ | extra-array
+
+ +
+
+
+
+ +

Function clear$

+
+
    + +
  • +

    Remove all elements from an array!

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array (updated!)

      +
      +
    +

    Returns T[]

    cleared x

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/compare.html b/functions/compare.html new file mode 100644 index 000000000..64dccdeb3 --- /dev/null +++ b/functions/compare.html @@ -0,0 +1,340 @@ +compare | extra-array
+
+ +
+
+
+
+ +

Function compare

+
+
    + +
  • +

    Compare two arrays (lexicographically).

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    • +
    • +

      U = T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      y: T[]
      +

      another array

      +
      +
    • +
    • +
      fc: CompareFunction<T | U> = null
      +

      compare function (a, b)

      +
      +
    • +
    • +
      fm: MapFunction<T, T | U> = null
      +

      map function (v, i, x)

      +
      +
    +

    Returns number

    x<y: -ve, x=y: 0, x>y: +ve

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/concat.html b/functions/concat.html new file mode 100644 index 000000000..dd33483dc --- /dev/null +++ b/functions/concat.html @@ -0,0 +1,323 @@ +concat | extra-array
+
+ +
+
+
+
+ +

Function concat

+
+
    + +
  • +

    Append values from arrays.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      Rest ...xs: T[][]
      +

      arrays

      +
      +
    +

    Returns T[]

    x₀ ⧺ x₁ ⧺ ... | [x₀, x₁, ...] = xs

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/concat_.html b/functions/concat_.html new file mode 100644 index 000000000..2450be351 --- /dev/null +++ b/functions/concat_.html @@ -0,0 +1,328 @@ +concat$ | extra-array
+
+ +
+
+
+
+ +

Function concat$

+
+
    + +
  • +

    Append values from arrays!

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array (updated!)

      +
      +
    • +
    • +
      Rest ...ys: Iterable<T>[]
      +

      arrays to append

      +
      +
    +

    Returns T[]

    x = x ⧺ y₀ ⧺ y₁ ⧺ ...] | [y₀, y₁, ...] = ys

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/copy.html b/functions/copy.html new file mode 100644 index 000000000..ccc9f3027 --- /dev/null +++ b/functions/copy.html @@ -0,0 +1,343 @@ +copy | extra-array
+
+ +
+
+
+
+ +

Function copy

+
+
    + +
  • +

    Copy part of array to another.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      target array

      +
      +
    • +
    • +
      y: T[]
      +

      source array

      +
      +
    • +
    • +
      j: number = 0
      +

      write index [0]

      +
      +
    • +
    • +
      i: number = 0
      +

      read begin index [0]

      +
      +
    • +
    • +
      I: number = y.length
      +

      read end index [|x|]

      +
      +
    +

    Returns T[]

    x[0..j] ⧺ y[i..I] ⧺ x[j+I-i..]

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/copyWithin.html b/functions/copyWithin.html new file mode 100644 index 000000000..831d7fd96 --- /dev/null +++ b/functions/copyWithin.html @@ -0,0 +1,338 @@ +copyWithin | extra-array
+
+ +
+
+
+
+ +

Function copyWithin

+
+
    + +
  • +

    Copy part of array within.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      j: number = 0
      +

      write index [0]

      +
      +
    • +
    • +
      i: number = 0
      +

      read begin index [0]

      +
      +
    • +
    • +
      I: number = x.length
      +

      read end index [|x|]

      +
      +
    +

    Returns T[]

    x[0..j] ⧺ x[i..I] ⧺ x[j+I-i..]

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/copyWithin_.html b/functions/copyWithin_.html new file mode 100644 index 000000000..cf61ee65b --- /dev/null +++ b/functions/copyWithin_.html @@ -0,0 +1,338 @@ +copyWithin$ | extra-array
+
+ +
+
+
+
+ +

Function copyWithin$

+
+
    + +
  • +

    Copy part of array within!

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array (updated!)

      +
      +
    • +
    • +
      j: number = 0
      +

      write index [0]

      +
      +
    • +
    • +
      i: number = 0
      +

      read begin index [0]

      +
      +
    • +
    • +
      I: number = x.length
      +

      read end index [|x|]

      +
      +
    +

    Returns T[]

    x = x[0..j] ⧺ x[i..I] ⧺ x[j+I-i..]

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/copy_.html b/functions/copy_.html new file mode 100644 index 000000000..e41249dcb --- /dev/null +++ b/functions/copy_.html @@ -0,0 +1,343 @@ +copy$ | extra-array
+
+ +
+
+
+
+ +

Function copy$

+
+
    + +
  • +

    Copy part of array to another!

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      target array (updated!)

      +
      +
    • +
    • +
      y: T[]
      +

      source array

      +
      +
    • +
    • +
      j: number = 0
      +

      write index [0]

      +
      +
    • +
    • +
      i: number = 0
      +

      read begin index [0]

      +
      +
    • +
    • +
      I: number = y.length
      +

      read end index [|x|]

      +
      +
    +

    Returns T[]

    x = x[0..j] ⧺ y[i..I] ⧺ x[j+I-i..]

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/count.html b/functions/count.html new file mode 100644 index 000000000..f60cdd9bc --- /dev/null +++ b/functions/count.html @@ -0,0 +1,328 @@ +count | extra-array
+
+ +
+
+
+
+ +

Function count

+
+
    + +
  • +

    Count values which satisfy a test.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      ft: TestFunction<T>
      +

      test function (v, i, x)

      +
      +
    +

    Returns number

    Σtᵢ | tᵢ = 1 if ft(vᵢ) else 0; vᵢ ∈ x

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/countEach.html b/functions/countEach.html new file mode 100644 index 000000000..c1e5ef186 --- /dev/null +++ b/functions/countEach.html @@ -0,0 +1,330 @@ +countEach | extra-array
+
+ +
+
+
+
+ +

Function countEach

+
+
    + +
  • +

    Count occurrences of each distinct value.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    • +
    • +

      U = T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      fm: MapFunction<T, T | U> = null
      +

      map function (v, i, x)

      +
      +
    +

    Returns Map<T | U, number>

    Map {value ⇒ count}

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/cut.html b/functions/cut.html new file mode 100644 index 000000000..ebc575e44 --- /dev/null +++ b/functions/cut.html @@ -0,0 +1,328 @@ +cut | extra-array
+
+ +
+
+
+
+ +

Function cut

+
+
    + +
  • +

    Break array when test passes.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      ft: TestFunction<T>
      +

      test function (v, i, x)

      +
      +
    +

    Returns T[][]

    [x[0..j], x[j..k], ...] | ft(x[i]) = true; i = j, k, ...

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/cutAt.html b/functions/cutAt.html new file mode 100644 index 000000000..45e390041 --- /dev/null +++ b/functions/cutAt.html @@ -0,0 +1,328 @@ +cutAt | extra-array
+
+ +
+
+
+
+ +

Function cutAt

+
+
    + +
  • +

    Break array at given indices.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      is: number[]
      +

      split ±indices (left to right)

      +
      +
    +

    Returns T[][]

    [x[0..j], x[j..k], ...] | ft(x[i]) = true; i = j, k, ...; i ∈ is

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/cutAtRight.html b/functions/cutAtRight.html new file mode 100644 index 000000000..d41c4e7d9 --- /dev/null +++ b/functions/cutAtRight.html @@ -0,0 +1,328 @@ +cutAtRight | extra-array
+
+ +
+
+
+
+ +

Function cutAtRight

+
+
    + +
  • +

    Break array after given indices.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      is: number[]
      +

      split ±indices (left to right)

      +
      +
    +

    Returns T[][]

    [x[0..j+1], x[j+1..k], ...] | ft(x[i]) = true; i = j, k, ...; i ∈ is

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/cutRight.html b/functions/cutRight.html new file mode 100644 index 000000000..524ba130d --- /dev/null +++ b/functions/cutRight.html @@ -0,0 +1,328 @@ +cutRight | extra-array
+
+ +
+
+
+
+ +

Function cutRight

+
+
    + +
  • +

    Break array after test passes.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      ft: TestFunction<T>
      +

      test function (v, i, x)

      +
      +
    +

    Returns T[][]

    [x[0..j+1], x[j+1..k], ...] | ft(x[i]) = true; i = j, k, ...

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/cycle.html b/functions/cycle.html new file mode 100644 index 000000000..36df37f73 --- /dev/null +++ b/functions/cycle.html @@ -0,0 +1,332 @@ +cycle | extra-array
+
+ +
+
+
+
+ +

Function cycle

+
+
    + +
  • +

    Obtain values that cycle through array.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      i: number = 0
      +

      begin ±index [0]

      +
      +
    • +
    • +
      n: number = x.length
      +

      number of values [|x|]

      +
      +
    +

    Returns T[]

    +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/deepClone.html b/functions/deepClone.html new file mode 100644 index 000000000..4a7b5e973 --- /dev/null +++ b/functions/deepClone.html @@ -0,0 +1,323 @@ +deepClone | extra-array
+
+ +
+
+
+
+ +

Function deepClone

+
+
    + +
  • +

    Deep clone an array.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    +

    Returns T[]

    deep clone of x

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/difference.html b/functions/difference.html new file mode 100644 index 000000000..4b0b3dfe4 --- /dev/null +++ b/functions/difference.html @@ -0,0 +1,340 @@ +difference | extra-array
+
+ +
+
+
+
+ +

Function difference

+
+
    + +
  • +

    Obtain values not present in another array.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    • +
    • +

      U = T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      y: T[]
      +

      another array

      +
      +
    • +
    • +
      fc: CompareFunction<T | U> = null
      +

      compare function (a, b)

      +
      +
    • +
    • +
      fm: MapFunction<T, T | U> = null
      +

      map function (v, i, x)

      +
      +
    +

    Returns T[]

    x - y = {v | v ∈ x, v ∉ y}

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/drop.html b/functions/drop.html new file mode 100644 index 000000000..62edca582 --- /dev/null +++ b/functions/drop.html @@ -0,0 +1,328 @@ +drop | extra-array
+
+ +
+
+
+
+ +

Function drop

+
+
    + +
  • +

    Discard first n values only.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      n: number = 1
      +

      number of values [1]

      +
      +
    +

    Returns T[]

    x[n..]

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/dropRight.html b/functions/dropRight.html new file mode 100644 index 000000000..14f4d05be --- /dev/null +++ b/functions/dropRight.html @@ -0,0 +1,328 @@ +dropRight | extra-array
+
+ +
+
+
+
+ +

Function dropRight

+
+
    + +
  • +

    Discard last n values only.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      n: number = 1
      +

      number of values [1]

      +
      +
    +

    Returns T[]

    x[0..-n]

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/dropWhile.html b/functions/dropWhile.html new file mode 100644 index 000000000..598f516e0 --- /dev/null +++ b/functions/dropWhile.html @@ -0,0 +1,328 @@ +dropWhile | extra-array
+
+ +
+
+
+
+ +

Function dropWhile

+
+
    + +
  • +

    Discard values from left, while a test passes.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      ft: TestFunction<T>
      +

      test function (v, i, x)

      +
      +
    +

    Returns T[]

    x[T..] | ft(x[i]) = true ∀ i ∈ [0, T-1] & ft(x[T]) = false

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/dropWhileRight.html b/functions/dropWhileRight.html new file mode 100644 index 000000000..e892bef79 --- /dev/null +++ b/functions/dropWhileRight.html @@ -0,0 +1,328 @@ +dropWhileRight | extra-array
+
+ +
+
+
+
+ +

Function dropWhileRight

+
+
    + +
  • +

    Discard values from right, while a test passes.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      ft: TestFunction<T>
      +

      test function (v, i, x)

      +
      +
    +

    Returns T[]

    x[0..T-1] | ft(x[i]) = true ∀ i ∈ [T, |x|-1] & ft(x[T-1]) = false

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/entries.html b/functions/entries.html new file mode 100644 index 000000000..8e7ac3f6a --- /dev/null +++ b/functions/entries.html @@ -0,0 +1,323 @@ +entries | extra-array
+
+ +
+
+
+
+ +

Function entries

+
+
    + +
  • +

    Obtain all index-value pairs.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    +

    Returns Entries<T>

    [[0, v₀], [1, v₁], ...] | vᵢ = x[i]

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/every.html b/functions/every.html new file mode 100644 index 000000000..45f2c3cf2 --- /dev/null +++ b/functions/every.html @@ -0,0 +1,328 @@ +every | extra-array
+
+ +
+
+
+
+ +

Function every

+
+
    + +
  • +

    Examine if all values satisfy a test.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      ft: TestFunction<T> = null
      +

      test function (v, i, x)

      +
      +
    +

    Returns boolean

    true if ft(vᵢ) = true for all vᵢ ∈ x

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/exclusiveScan.html b/functions/exclusiveScan.html new file mode 100644 index 000000000..013efce78 --- /dev/null +++ b/functions/exclusiveScan.html @@ -0,0 +1,335 @@ +exclusiveScan | extra-array
+
+ +
+
+
+
+ +

Function exclusiveScan

+
+
    + +
  • +

    Perform exclusive prefix scan from left to right.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    • +
    • +

      U = T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      fr: ReduceFunction<T, T | U>
      +

      reduce function (acc, v, i, x)

      +
      +
    • +
    • +
      acc: T | U
      +

      initial value

      +
      +
    +

    Returns (T | U)[]

    [acc, fr(acc, v₀), fr(fr(acc, v₀), v₁)...]

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/exclusiveScan_.html b/functions/exclusiveScan_.html new file mode 100644 index 000000000..a16831de4 --- /dev/null +++ b/functions/exclusiveScan_.html @@ -0,0 +1,333 @@ +exclusiveScan$ | extra-array
+
+ +
+
+
+
+ +

Function exclusiveScan$

+
+
    + +
  • +

    Perform exclusive prefix scan from left to right!

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array (updated!)

      +
      +
    • +
    • +
      fr: ReduceFunction<T, T>
      +

      reduce function (acc, v, i, x)

      +
      +
    • +
    • +
      acc: T
      +

      initial value

      +
      +
    +

    Returns T[]

    x = [acc, fr(acc, v₀), fr(fr(acc, v₀), v₁)...]

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/fill.html b/functions/fill.html new file mode 100644 index 000000000..0a84b8116 --- /dev/null +++ b/functions/fill.html @@ -0,0 +1,338 @@ +fill | extra-array
+
+ +
+
+
+
+ +

Function fill

+
+
    + +
  • +

    Fill with given value.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      v: T
      +

      value

      +
      +
    • +
    • +
      i: number = 0
      +

      begin index [0]

      +
      +
    • +
    • +
      I: number = x.length
      +

      end index [|x|]

      +
      +
    +

    Returns T[]

    x' | x' = x; x'[i..I] = v

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/fill_.html b/functions/fill_.html new file mode 100644 index 000000000..8757d604f --- /dev/null +++ b/functions/fill_.html @@ -0,0 +1,338 @@ +fill$ | extra-array
+
+ +
+
+
+
+ +

Function fill$

+
+
    + +
  • +

    Fill with given value!

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array (updated!)

      +
      +
    • +
    • +
      v: T
      +

      value

      +
      +
    • +
    • +
      i: number = 0
      +

      begin index [0]

      +
      +
    • +
    • +
      I: number = x.length
      +

      end index [|x|]

      +
      +
    +

    Returns T[]

    x | x[i..I] = v

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/filter.html b/functions/filter.html new file mode 100644 index 000000000..1bbfa165d --- /dev/null +++ b/functions/filter.html @@ -0,0 +1,328 @@ +filter | extra-array
+
+ +
+
+
+
+ +

Function filter

+
+
    + +
  • +

    Keep values which pass a test.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      ft: TestFunction<T>
      +

      test function (v, i, x)

      +
      +
    +

    Returns T[]

    [v₀, v₁, ...] | ft(vᵢ) = true; vᵢ ∈ x

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/filterAt.html b/functions/filterAt.html new file mode 100644 index 000000000..80477c110 --- /dev/null +++ b/functions/filterAt.html @@ -0,0 +1,328 @@ +filterAt | extra-array
+
+ +
+
+
+
+ +

Function filterAt

+
+
    + +
  • +

    Keep values at given indices.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      is: number[]
      +

      indices

      +
      +
    +

    Returns T[]

    v₀, v₁, ... | vᵢ = x[i]; i ∈ is

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/filter_.html b/functions/filter_.html new file mode 100644 index 000000000..4f58fa469 --- /dev/null +++ b/functions/filter_.html @@ -0,0 +1,328 @@ +filter$ | extra-array
+
+ +
+
+
+
+ +

Function filter$

+
+
    + +
  • +

    Keep values which pass a test!

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array (updated!)

      +
      +
    • +
    • +
      ft: TestFunction<T>
      +

      test function (v, i, x)

      +
      +
    +

    Returns T[]

    x = [v₀, v₁, ...] | ft(vᵢ) = true; vᵢ ∈ x

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/find.html b/functions/find.html new file mode 100644 index 000000000..b35ef4322 --- /dev/null +++ b/functions/find.html @@ -0,0 +1,328 @@ +find | extra-array
+
+ +
+
+
+
+ +

Function find

+
+
    + +
  • +

    Find first value passing a test.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      ft: TestFunction<T>
      +

      test function (v, i, x)

      +
      +
    +

    Returns T

    first v | ft(v) = true; v ∈ x

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/findRight.html b/functions/findRight.html new file mode 100644 index 000000000..d9ffca076 --- /dev/null +++ b/functions/findRight.html @@ -0,0 +1,328 @@ +findRight | extra-array
+
+ +
+
+
+
+ +

Function findRight

+
+
    + +
  • +

    Find last value passing a test.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      ft: TestFunction<T>
      +

      test function (v, i, x)

      +
      +
    +

    Returns T

    last v | ft(v) = true; v ∈ x

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/flat.html b/functions/flat.html new file mode 100644 index 000000000..58262f1a0 --- /dev/null +++ b/functions/flat.html @@ -0,0 +1,333 @@ +flat | extra-array
+
+ +
+
+
+
+ +

Function flat

+
+
    + +
  • +

    Flatten nested array to given depth.

    +
    +
    +

    Parameters

    +
      +
    • +
      x: any[]
      +

      a nested array

      +
      +
    • +
    • +
      n: number = -1
      +

      maximum depth [-1 ⇒ all]

      +
      +
    • +
    • +
      fm: MapFunction<any, any> = null
      +

      map function (v, i, x)

      +
      +
    • +
    • +
      ft: TestFunction<any> = null
      +

      flatten test function (v, i, x) [is]

      +
      +
    +

    Returns any[]

    flat iterable

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/flatMap.html b/functions/flatMap.html new file mode 100644 index 000000000..aefad8d42 --- /dev/null +++ b/functions/flatMap.html @@ -0,0 +1,328 @@ +flatMap | extra-array
+
+ +
+
+
+
+ +

Function flatMap

+
+
    + +
  • +

    Flatten nested array, based on map function.

    +
    +
    +

    Parameters

    +
      +
    • +
      x: any[]
      +

      an array

      +
      +
    • +
    • +
      fm: MapFunction<any, any> = null
      +

      map function (v, i, x)

      +
      +
    • +
    • +
      ft: TestFunction<any> = null
      +

      flatten test function (v, i, x) [is]

      +
      +
    +

    Returns any[]

    flat iterable

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/forEach.html b/functions/forEach.html new file mode 100644 index 000000000..e525cbdd4 --- /dev/null +++ b/functions/forEach.html @@ -0,0 +1,327 @@ +forEach | extra-array
+
+ +
+
+
+
+ +

Function forEach

+
+
    + +
  • +

    Call a function for each value.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      fp: ProcessFunction<T>
      +

      process function (v, i, x)

      +
      +
    +

    Returns void

    +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/fromApplication.html b/functions/fromApplication.html new file mode 100644 index 000000000..2c9aee8c0 --- /dev/null +++ b/functions/fromApplication.html @@ -0,0 +1,333 @@ +fromApplication | extra-array
+
+ +
+
+
+
+ +

Function fromApplication

+
+
    + +
  • +

    Generate array from repeated function application.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      fm: MapFunction<T, T>
      +

      map function (v, i)

      +
      +
    • +
    • +
      v: T
      +

      start value

      +
      +
    • +
    • +
      n: number
      +

      number of values

      +
      +
    +

    Returns T[]

    [v, fm(v), fm(fm(v)), ...]

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/fromInvocation.html b/functions/fromInvocation.html new file mode 100644 index 000000000..81b7dcefb --- /dev/null +++ b/functions/fromInvocation.html @@ -0,0 +1,328 @@ +fromInvocation | extra-array
+
+ +
+
+
+
+ +

Function fromInvocation

+
+
    + +
  • +

    Generate array from repeated function invocation.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      fn: Function
      +

      function

      +
      +
    • +
    • +
      n: number
      +

      number of values

      +
      +
    +

    Returns T[]

    [fn(), fn(), ...]

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/fromIterable.html b/functions/fromIterable.html new file mode 100644 index 000000000..4e6247672 --- /dev/null +++ b/functions/fromIterable.html @@ -0,0 +1,323 @@ +fromIterable | extra-array
+
+ +
+
+
+
+ +

Function fromIterable

+
+
    + +
  • +

    Convert an iterable to array.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: Iterable<T>
      +

      an iterable

      +
      +
    +

    Returns T[]

    x as array

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/fromIterable_.html b/functions/fromIterable_.html new file mode 100644 index 000000000..35420379d --- /dev/null +++ b/functions/fromIterable_.html @@ -0,0 +1,323 @@ +fromIterable$ | extra-array
+
+ +
+
+
+
+ +

Function fromIterable$

+
+
    + +
  • +

    Convert an iterable to array!

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: Iterable<T>
      +

      an iterable (updatable if array!)

      +
      +
    +

    Returns T[]

    x as array

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/fromRange.html b/functions/fromRange.html new file mode 100644 index 000000000..d63b584e3 --- /dev/null +++ b/functions/fromRange.html @@ -0,0 +1,328 @@ +fromRange | extra-array
+
+ +
+
+
+
+ +

Function fromRange

+
+
    + +
  • +

    Generate array from given number range.

    +
    +
    +

    Parameters

    +
      +
    • +
      v: number
      +

      start number

      +
      +
    • +
    • +
      V: number
      +

      end number, excluding

      +
      +
    • +
    • +
      dv: number = 1
      +

      step size [1]

      +
      +
    +

    Returns number[]

    [v, v+dv, v+2dv, ...]

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/get.html b/functions/get.html new file mode 100644 index 000000000..888c6d217 --- /dev/null +++ b/functions/get.html @@ -0,0 +1,328 @@ +get | extra-array
+
+ +
+
+
+
+ +

Function get

+
+
    + +
  • +

    Get value at index.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      i: number
      +

      index

      +
      +
    +

    Returns T

    x[i]

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/getAll.html b/functions/getAll.html new file mode 100644 index 000000000..345caa4eb --- /dev/null +++ b/functions/getAll.html @@ -0,0 +1,328 @@ +getAll | extra-array
+
+ +
+
+
+
+ +

Function getAll

+
+
    + +
  • +

    Get values at indices.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      is: number[]
      +

      indices

      +
      +
    +

    Returns T[]

    [x[i₀], x[i₁], ...] | [i₀, i₁, ...] = is

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/getPath.html b/functions/getPath.html new file mode 100644 index 000000000..38d40e3c0 --- /dev/null +++ b/functions/getPath.html @@ -0,0 +1,323 @@ +getPath | extra-array
+
+ +
+
+
+
+ +

Function getPath

+
+
    + +
  • +

    Get value at path in a nested array.

    +
    +
    +

    Parameters

    +
      +
    • +
      x: any[]
      +

      a nested array

      +
      +
    • +
    • +
      p: number[]
      +

      path

      +
      +
    +

    Returns any

    x[i₀][i₁][...] | [i₀, i₁, ...] = p

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/group.html b/functions/group.html new file mode 100644 index 000000000..b6fdb191f --- /dev/null +++ b/functions/group.html @@ -0,0 +1,335 @@ +group | extra-array
+
+ +
+
+
+
+ +

Function group

+
+
    + +
  • +

    Keep similar values together and in order.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    • +
    • +

      U = T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      fc: CompareFunction<T | U> = null
      +

      compare function (a, b)

      +
      +
    • +
    • +
      fm: MapFunction<T, T | U> = null
      +

      map function (v, i, x)

      +
      +
    +

    Returns T[][]

    [x[0..k], x[k..l], ...] | fc(x[i], x[j]) = 0; i, j = 0..k / k..l / ...

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/hasInfix.html b/functions/hasInfix.html new file mode 100644 index 000000000..f655e3e64 --- /dev/null +++ b/functions/hasInfix.html @@ -0,0 +1,340 @@ +hasInfix | extra-array
+
+ +
+
+
+
+ +

Function hasInfix

+
+
    + +
  • +

    Examine if array contains an infix.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    • +
    • +

      U = T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      y: T[]
      +

      search infix

      +
      +
    • +
    • +
      fc: CompareFunction<T | U> = null
      +

      compare function (a, b)

      +
      +
    • +
    • +
      fm: MapFunction<T, T | U> = null
      +

      map function (v, i, x)

      +
      +
    +

    Returns boolean

    x[i..I] = y for some i, I?

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/hasPath.html b/functions/hasPath.html new file mode 100644 index 000000000..fb54d098d --- /dev/null +++ b/functions/hasPath.html @@ -0,0 +1,323 @@ +hasPath | extra-array
+
+ +
+
+
+
+ +

Function hasPath

+
+
    + +
  • +

    Check if nested array has a path.

    +
    +
    +

    Parameters

    +
      +
    • +
      x: any[]
      +

      a nested array

      +
      +
    • +
    • +
      p: number[]
      +

      path

      +
      +
    +

    Returns boolean

    x[i₀][i₁][...] exists? | [i₀, i₁, ...] = p

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/hasPermutation.html b/functions/hasPermutation.html new file mode 100644 index 000000000..f2f504e61 --- /dev/null +++ b/functions/hasPermutation.html @@ -0,0 +1,340 @@ +hasPermutation | extra-array
+
+ +
+
+
+
+ +

Function hasPermutation

+
+
    + +
  • +

    Examine if array has a permutation.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    • +
    • +

      U = T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      y: T[]
      +

      search permutation

      +
      +
    • +
    • +
      fc: CompareFunction<T | U> = null
      +

      map function (v, i, x)

      +
      +
    • +
    • +
      fm: MapFunction<T, T | U> = null
      +

      compare function (a, b)

      +
      +
    +

    Returns boolean

    x contains a shuffled version of y?

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/hasPrefix.html b/functions/hasPrefix.html new file mode 100644 index 000000000..8c11d5e2f --- /dev/null +++ b/functions/hasPrefix.html @@ -0,0 +1,340 @@ +hasPrefix | extra-array
+
+ +
+
+
+
+ +

Function hasPrefix

+
+
    + +
  • +

    Examine if array starts with a prefix.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    • +
    • +

      U = T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      y: T[]
      +

      search prefix

      +
      +
    • +
    • +
      fc: CompareFunction<T | U> = null
      +

      compare function (a, b)

      +
      +
    • +
    • +
      fm: MapFunction<T, T | U> = null
      +

      map function (v, i, x)

      +
      +
    +

    Returns boolean

    x[0..|y|] = y?

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/hasSubsequence.html b/functions/hasSubsequence.html new file mode 100644 index 000000000..3e2bad7b4 --- /dev/null +++ b/functions/hasSubsequence.html @@ -0,0 +1,340 @@ +hasSubsequence | extra-array
+
+ +
+
+
+
+ +

Function hasSubsequence

+
+
    + +
  • +

    Examine if array has a subsequence.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    • +
    • +

      U = T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      y: T[]
      +

      search subsequence

      +
      +
    • +
    • +
      fc: CompareFunction<T | U> = null
      +

      compare function (a, b)

      +
      +
    • +
    • +
      fm: MapFunction<T, T | U> = null
      +

      map function (v, i, x)

      +
      +
    +

    Returns boolean

    x[i₀] ⧺ x[i₁] ⧺ ... = y, for some i₀, i₁, ...? | i₀ < i₁ < ...

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/hasSuffix.html b/functions/hasSuffix.html new file mode 100644 index 000000000..de23ffeee --- /dev/null +++ b/functions/hasSuffix.html @@ -0,0 +1,340 @@ +hasSuffix | extra-array
+
+ +
+
+
+
+ +

Function hasSuffix

+
+
    + +
  • +

    Examine if array ends with a suffix.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    • +
    • +

      U = T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      y: T[]
      +

      search suffix

      +
      +
    • +
    • +
      fc: CompareFunction<T | U> = null
      +

      compare function (a, b)

      +
      +
    • +
    • +
      fm: MapFunction<T, T | U> = null
      +

      map function (v, i, x)

      +
      +
    +

    Returns boolean

    x[|x|-|y|..] = y?

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/hasUnsortedValue.html b/functions/hasUnsortedValue.html new file mode 100644 index 000000000..c057202d7 --- /dev/null +++ b/functions/hasUnsortedValue.html @@ -0,0 +1,335 @@ +hasUnsortedValue | extra-array
+
+ +
+
+
+
+ +

Function hasUnsortedValue

+
+
    + +
  • +

    Examine if array has an unsorted value.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    • +
    • +

      U = T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      fc: CompareFunction<T | U> = null
      +

      compare function (a, b)

      +
      +
    • +
    • +
      fm: MapFunction<T, T | U> = null
      +

      map function (v, i, x)

      +
      +
    +

    Returns boolean

    x is not sorted?

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/hasValue.html b/functions/hasValue.html new file mode 100644 index 000000000..45e7fd0ab --- /dev/null +++ b/functions/hasValue.html @@ -0,0 +1,340 @@ +hasValue | extra-array
+
+ +
+
+
+
+ +

Function hasValue

+
+
    + +
  • +

    Examine if array has a value.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    • +
    • +

      U = T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      v: T
      +

      search value

      +
      +
    • +
    • +
      fc: CompareFunction<T | U> = null
      +

      compare function (a, b)

      +
      +
    • +
    • +
      fm: MapFunction<T, T | U> = null
      +

      map function (v, i, x)

      +
      +
    +

    Returns boolean

    v ∈ x?

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/head.html b/functions/head.html new file mode 100644 index 000000000..dc2f07704 --- /dev/null +++ b/functions/head.html @@ -0,0 +1,328 @@ +head | extra-array
+
+ +
+
+
+
+ +

Function head

+
+
    + +
  • +

    Get first value.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      Optional vd: T
      +

      default value

      +
      +
    +

    Returns T

    x[0] || vd

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/ientries.html b/functions/ientries.html new file mode 100644 index 000000000..267293f37 --- /dev/null +++ b/functions/ientries.html @@ -0,0 +1,323 @@ +ientries | extra-array
+
+ +
+
+
+
+ +

Function ientries

+
+
    + +
  • +

    List all index-value pairs.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    +

    Returns IEntries<T>

    [0, v₀], [1, v₁], ... | vᵢ = x[i]

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/iinfixes.html b/functions/iinfixes.html new file mode 100644 index 000000000..d3a828793 --- /dev/null +++ b/functions/iinfixes.html @@ -0,0 +1,328 @@ +iinfixes | extra-array
+
+ +
+
+
+
+ +

Function iinfixes

+
+
    + +
  • +

    List all possible infixes.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      n: number = -1
      +

      number of values [-1 ⇒ any]

      +
      +
    +

    Returns IterableIterator<T[]>

    [], x[0..1], x[0..2], ..., x[1..2], ... if n<0; only of length n otherwise

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/ikeys.html b/functions/ikeys.html new file mode 100644 index 000000000..8d88fc77b --- /dev/null +++ b/functions/ikeys.html @@ -0,0 +1,323 @@ +ikeys | extra-array
+
+ +
+
+
+
+ +

Function ikeys

+
+
    + +
  • +

    List all indices.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    +

    Returns IterableIterator<number>

    0, 1, ..., |x|-1

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/includes.html b/functions/includes.html new file mode 100644 index 000000000..a0e09d320 --- /dev/null +++ b/functions/includes.html @@ -0,0 +1,333 @@ +includes | extra-array
+
+ +
+
+
+
+ +

Function includes

+
+
    + +
  • +

    Check if array has a value.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      v: T
      +

      search value

      +
      +
    • +
    • +
      i: number = 0
      +

      begin index [0]

      +
      +
    +

    Returns boolean

    v ∈ x[i..]?

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/inclusiveScan.html b/functions/inclusiveScan.html new file mode 100644 index 000000000..521bdc638 --- /dev/null +++ b/functions/inclusiveScan.html @@ -0,0 +1,335 @@ +inclusiveScan | extra-array
+
+ +
+
+
+
+ +

Function inclusiveScan

+
+
    + +
  • +

    Perform inclusive prefix scan from left to right.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    • +
    • +

      U = T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      fr: ReduceFunction<T, T | U>
      +

      reduce function (acc, v, i, x)

      +
      +
    • +
    • +
      Optional acc: T | U
      +

      initial value

      +
      +
    +

    Returns (T | U)[]

    [fr(acc, v₀), fr(fr(acc, v₀), v₁)...]

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/inclusiveScan_.html b/functions/inclusiveScan_.html new file mode 100644 index 000000000..5649dc216 --- /dev/null +++ b/functions/inclusiveScan_.html @@ -0,0 +1,333 @@ +inclusiveScan$ | extra-array
+
+ +
+
+
+
+ +

Function inclusiveScan$

+
+
    + +
  • +

    Perform inclusive prefix scan from left to right!

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array (updated!)

      +
      +
    • +
    • +
      fr: ReduceFunction<T, T>
      +

      reduce function (acc, v, i, x)

      +
      +
    • +
    • +
      acc: T
      +

      initial value

      +
      +
    +

    Returns T[]

    x = [fr(acc, v₀), fr(fr(acc, v₀), v₁)...]

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/index.html b/functions/index.html new file mode 100644 index 000000000..c23e853a6 --- /dev/null +++ b/functions/index.html @@ -0,0 +1,328 @@ +index | extra-array
+
+ +
+
+
+
+ +

Function index

+
+
    + +
  • +

    Get zero-based index for an element in array.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      i: number
      +

      ±index

      +
      +
    +

    Returns number

    i' | x[i'] = x[i]; i' ∈ [0, |x|]

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/indexOf.html b/functions/indexOf.html new file mode 100644 index 000000000..8fcc1e838 --- /dev/null +++ b/functions/indexOf.html @@ -0,0 +1,333 @@ +indexOf | extra-array
+
+ +
+
+
+
+ +

Function indexOf

+
+
    + +
  • +

    Find first index of a value.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      v: T
      +

      search value

      +
      +
    • +
    • +
      i: number = 0
      +

      begin index [0]

      +
      +
    +

    Returns number

    index of v in x[i..] if found else -1

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/indexRange.html b/functions/indexRange.html new file mode 100644 index 000000000..c15c25701 --- /dev/null +++ b/functions/indexRange.html @@ -0,0 +1,333 @@ +indexRange | extra-array
+
+ +
+
+
+
+ +

Function indexRange

+
+
    + +
  • +

    Get zero-based index range for part of array.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      i: number = 0
      +

      begin ±index [0]

      +
      +
    • +
    • +
      I: number = x.length
      +

      end ±index (exclusive) [|x|]

      +
      +
    +

    Returns [number, number]

    [i', I'] | i' ≤ I'; i', I' ∈ [0, |x|]

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/infixes.html b/functions/infixes.html new file mode 100644 index 000000000..a2218e9e9 --- /dev/null +++ b/functions/infixes.html @@ -0,0 +1,328 @@ +infixes | extra-array
+
+ +
+
+
+
+ +

Function infixes

+
+
    + +
  • +

    Obtain all possible infixes.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      n: number = -1
      +

      number of values [-1 ⇒ any]

      +
      +
    +

    Returns T[][]

    [[], x[0..1], x[0..2], ..., x[1..2], ...] if n<0; [only of length n] otherwise

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/init.html b/functions/init.html new file mode 100644 index 000000000..ec982c282 --- /dev/null +++ b/functions/init.html @@ -0,0 +1,323 @@ +init | extra-array
+
+ +
+
+
+
+ +

Function init

+
+
    + +
  • +

    Get values except last.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    +

    Returns T[]

    x[0..|x|-1]

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/interleave.html b/functions/interleave.html new file mode 100644 index 000000000..a4c79d60f --- /dev/null +++ b/functions/interleave.html @@ -0,0 +1,323 @@ +interleave | extra-array
+
+ +
+
+
+
+ +

Function interleave

+
+
    + +
  • +

    Place values from iterables alternately.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      xs: T[][]
      +

      arrays

      +
      +
    +

    Returns T[]

    [x₀[0], x₁[0], ..., x₀[1], x₁[0], ...] | [x₀, x₁, ...] = xs

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/intermix.html b/functions/intermix.html new file mode 100644 index 000000000..f2d7845a4 --- /dev/null +++ b/functions/intermix.html @@ -0,0 +1,348 @@ +intermix | extra-array
+
+ +
+
+
+
+ +

Function intermix

+
+
    + +
  • +

    Place values of an array between another.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      y: T[]
      +

      another array

      +
      +
    • +
    • +
      m: number = 1
      +

      number of values from x [1]

      +
      +
    • +
    • +
      n: number = 1
      +

      number of values from y [1]

      +
      +
    • +
    • +
      s: number = m
      +

      step size for x [m]

      +
      +
    • +
    • +
      t: number = n
      +

      step size for y [n]

      +
      +
    +

    Returns T[]

    x[0..m] ⧺ y[0..n] ⧺ x[s..s+m] ⧺ y[t..t+n] ⧺ ... ⧺ x[k*s..|x|-1] | k ∈ W

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/interpolate.html b/functions/interpolate.html new file mode 100644 index 000000000..99ccb869b --- /dev/null +++ b/functions/interpolate.html @@ -0,0 +1,328 @@ +interpolate | extra-array
+
+ +
+
+
+
+ +

Function interpolate

+
+
    + +
  • +

    Estimate new values between existing ones.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      fc: CombineFunction<T>
      +

      combine function (a, b)

      +
      +
    +

    Returns T[]

    [x[0], fc(x[0], x[1]), x[1], fc(x[1], x[2]), ..., x[|x|-1]]

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/intersection.html b/functions/intersection.html new file mode 100644 index 000000000..4a5045b52 --- /dev/null +++ b/functions/intersection.html @@ -0,0 +1,340 @@ +intersection | extra-array
+
+ +
+
+
+
+ +

Function intersection

+
+
    + +
  • +

    Obtain values present in both arrays.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    • +
    • +

      U = T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      y: T[]
      +

      another array

      +
      +
    • +
    • +
      fc: CompareFunction<T | U> = null
      +

      compare function (a, b)

      +
      +
    • +
    • +
      fm: MapFunction<T, T | U> = null
      +

      map function (v, i, x)

      +
      +
    +

    Returns T[]

    x ∩ y = {v | v ∈ x, v ∈ y}

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/intersperse.html b/functions/intersperse.html new file mode 100644 index 000000000..a0f6f666f --- /dev/null +++ b/functions/intersperse.html @@ -0,0 +1,328 @@ +intersperse | extra-array
+
+ +
+
+
+
+ +

Function intersperse

+
+
    + +
  • +

    Place a separator between every value.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      v: T
      +

      separator

      +
      +
    +

    Returns T[]

    [x[0], v, x[1], v, ..., x[|x|-1]]

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/ipermutations.html b/functions/ipermutations.html new file mode 100644 index 000000000..28f8c0e3e --- /dev/null +++ b/functions/ipermutations.html @@ -0,0 +1,328 @@ +ipermutations | extra-array
+
+ +
+
+
+
+ +

Function ipermutations

+
+
    + +
  • +

    List all possible permutations.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      n: number = -1
      +

      number of values [-1 ⇒ any]

      +
      +
    +

    Returns IterableIterator<T[]>

    [], arrangements of length 1, of length 2, ... if n<0; only of length n otherwise

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/iprefixes.html b/functions/iprefixes.html new file mode 100644 index 000000000..3cb543e52 --- /dev/null +++ b/functions/iprefixes.html @@ -0,0 +1,328 @@ +iprefixes | extra-array
+
+ +
+
+
+
+ +

Function iprefixes

+
+
    + +
  • +

    List all possible prefixes.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      n: number = -1
      +

      number of values [-1 ⇒ any]

      +
      +
    +

    Returns IterableIterator<T[]>

    [], x[..1], x[..2], ... if n<0; x[..n] otherwise

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/is.html b/functions/is.html new file mode 100644 index 000000000..e056eb0a0 --- /dev/null +++ b/functions/is.html @@ -0,0 +1,318 @@ +is | extra-array
+
+ +
+
+
+
+ +

Function is

+
+
    + +
  • +

    Check if value is an array.

    +
    +
    +

    Parameters

    +
      +
    • +
      v: any
      +

      a value

      +
      +
    +

    Returns v is any[]

    v is an array?

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/isDisjoint.html b/functions/isDisjoint.html new file mode 100644 index 000000000..0960f4c4b --- /dev/null +++ b/functions/isDisjoint.html @@ -0,0 +1,340 @@ +isDisjoint | extra-array
+
+ +
+
+
+
+ +

Function isDisjoint

+
+
    + +
  • +

    Examine if arrays have no value in common.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    • +
    • +

      U = T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      y: T[]
      +

      another array

      +
      +
    • +
    • +
      fc: CompareFunction<T | U> = null
      +

      compare function (a, b)

      +
      +
    • +
    • +
      fm: MapFunction<T, T | U> = null
      +

      map function (v, i, x)

      +
      +
    +

    Returns boolean

    x ∩ y = Φ?

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/isEmpty.html b/functions/isEmpty.html new file mode 100644 index 000000000..ced510341 --- /dev/null +++ b/functions/isEmpty.html @@ -0,0 +1,323 @@ +isEmpty | extra-array
+
+ +
+
+
+
+ +

Function isEmpty

+
+
    + +
  • +

    Check if an array is empty.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    +

    Returns boolean

    |x| = 0?

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/isEqual.html b/functions/isEqual.html new file mode 100644 index 000000000..6512e997b --- /dev/null +++ b/functions/isEqual.html @@ -0,0 +1,340 @@ +isEqual | extra-array
+
+ +
+
+
+
+ +

Function isEqual

+
+
    + +
  • +

    Examine if two arrays are equal.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    • +
    • +

      U = T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      y: T[]
      +

      another array

      +
      +
    • +
    • +
      fc: CompareFunction<T | U> = null
      +

      compare function (a, b)

      +
      +
    • +
    • +
      fm: MapFunction<T, T | U> = null
      +

      map function (v, i, x)

      +
      +
    +

    Returns boolean

    x = y?

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/isSorted.html b/functions/isSorted.html new file mode 100644 index 000000000..a011fa6b7 --- /dev/null +++ b/functions/isSorted.html @@ -0,0 +1,335 @@ +isSorted | extra-array
+
+ +
+
+
+
+ +

Function isSorted

+
+
    + +
  • +

    Examine if array is sorted.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    • +
    • +

      U = T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      fc: CompareFunction<T | U> = null
      +

      compare function (a, b)

      +
      +
    • +
    • +
      fm: MapFunction<T, T | U> = null
      +

      map function (v, i, x)

      +
      +
    +

    Returns boolean

    x is sorted?

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/isUnique.html b/functions/isUnique.html new file mode 100644 index 000000000..670dbf88d --- /dev/null +++ b/functions/isUnique.html @@ -0,0 +1,335 @@ +isUnique | extra-array
+
+ +
+
+
+
+ +

Function isUnique

+
+
    + +
  • +

    Examine if there are no duplicate values.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    • +
    • +

      U = T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      fc: CompareFunction<T | U> = null
      +

      compare function (a, b)

      +
      +
    • +
    • +
      fm: MapFunction<T, T | U> = null
      +

      map function (v, i, x)

      +
      +
    +

    Returns boolean

    ∀ vᵢ, vⱼ ∈ x, is vᵢ ≠ vⱼ?

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/isubsequences.html b/functions/isubsequences.html new file mode 100644 index 000000000..eb87e05f2 --- /dev/null +++ b/functions/isubsequences.html @@ -0,0 +1,328 @@ +isubsequences | extra-array
+
+ +
+
+
+
+ +

Function isubsequences

+
+
    + +
  • +

    List all possible subsequences.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      n: number = -1
      +

      number of values [-1 ⇒ any]

      +
      +
    +

    Returns IterableIterator<T[]>

    elements selected by bit from 0..2^|x| if n<0; only of length n otherwise

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/isuffixes.html b/functions/isuffixes.html new file mode 100644 index 000000000..1ec8b63d9 --- /dev/null +++ b/functions/isuffixes.html @@ -0,0 +1,328 @@ +isuffixes | extra-array
+
+ +
+
+
+
+ +

Function isuffixes

+
+
    + +
  • +

    List all possible suffixes.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      n: number = -1
      +

      number of values [-1 ⇒ any]

      +
      +
    +

    Returns IterableIterator<T[]>

    x[0..], x[1..], x[2..], ... if n<0; x[-n..] otherwise

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/ivalues.html b/functions/ivalues.html new file mode 100644 index 000000000..4b505e301 --- /dev/null +++ b/functions/ivalues.html @@ -0,0 +1,323 @@ +ivalues | extra-array
+
+ +
+
+
+
+ +

Function ivalues

+
+
    + +
  • +

    List all values.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    +

    Returns IterableIterator<T>

    v₀, v₁, ... | vᵢ = x[i]

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/join.html b/functions/join.html new file mode 100644 index 000000000..d018d33db --- /dev/null +++ b/functions/join.html @@ -0,0 +1,328 @@ +join | extra-array
+
+ +
+
+
+
+ +

Function join

+
+
    + +
  • +

    Join values together into a string.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      sep: string = ","
      +

      separator [,]

      +
      +
    +

    Returns string

    "${v₀}${sep}${v₁}..." | vᵢ ∈ x

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/keys.html b/functions/keys.html new file mode 100644 index 000000000..0b725b59f --- /dev/null +++ b/functions/keys.html @@ -0,0 +1,323 @@ +keys | extra-array
+
+ +
+
+
+
+ +

Function keys

+
+
    + +
  • +

    Obtain all indices.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    +

    Returns number[]

    [0, 1, ..., |x|-1]

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/last.html b/functions/last.html new file mode 100644 index 000000000..3c0ad7918 --- /dev/null +++ b/functions/last.html @@ -0,0 +1,328 @@ +last | extra-array
+
+ +
+
+
+
+ +

Function last

+
+
    + +
  • +

    Get last value.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      Optional vd: T
      +

      default value

      +
      +
    +

    Returns T

    x[|x|-1] || vd

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/lastIndexOf.html b/functions/lastIndexOf.html new file mode 100644 index 000000000..749cf54a8 --- /dev/null +++ b/functions/lastIndexOf.html @@ -0,0 +1,333 @@ +lastIndexOf | extra-array
+
+ +
+
+
+
+ +

Function lastIndexOf

+
+
    + +
  • +

    Find last index of a value.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      v: T
      +

      search value

      +
      +
    • +
    • +
      i: number = ...
      +

      begin index [|x|-1]

      +
      +
    +

    Returns number

    last index of v in x[0..i] if found else -1

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/length.html b/functions/length.html new file mode 100644 index 000000000..dc8c5851e --- /dev/null +++ b/functions/length.html @@ -0,0 +1,333 @@ +length | extra-array
+
+ +
+
+
+
+ +

Function length

+
+
    + +
  • +

    Find the length of an array.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      i: number = 0
      +

      begin ±index [0]

      +
      +
    • +
    • +
      I: number = x.length
      +

      end ±index (exclusive) [X]

      +
      +
    +

    Returns number

    |x[i..I]|

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/map.html b/functions/map.html new file mode 100644 index 000000000..e68a1807e --- /dev/null +++ b/functions/map.html @@ -0,0 +1,330 @@ +map | extra-array
+
+ +
+
+
+
+ +

Function map

+
+
    + +
  • +

    Transform values of an array.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    • +
    • +

      U = T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      fm: MapFunction<T, T | U>
      +

      map function (v, i, x)

      +
      +
    +

    Returns (T | U)[]

    [fm(v₀), fm(v₁), ...] | vᵢ ∈ x

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/map_.html b/functions/map_.html new file mode 100644 index 000000000..0f9f71024 --- /dev/null +++ b/functions/map_.html @@ -0,0 +1,328 @@ +map$ | extra-array
+
+ +
+
+
+
+ +

Function map$

+
+
    + +
  • +

    Transform values of an array!

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array (updated!)

      +
      +
    • +
    • +
      fm: MapFunction<T, T>
      +

      map function (v, i, x)

      +
      +
    +

    Returns T[]

    x = [fm(v₀), fm(v₁), ...]; vᵢ ∈ x

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/maximum.html b/functions/maximum.html new file mode 100644 index 000000000..fc713240f --- /dev/null +++ b/functions/maximum.html @@ -0,0 +1,335 @@ +maximum | extra-array
+
+ +
+
+
+
+ +

Function maximum

+
+
    + +
  • +

    Find first largest value.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    • +
    • +

      U = T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      fc: CompareFunction<T | U> = null
      +

      compare function (a, b)

      +
      +
    • +
    • +
      fm: MapFunction<T, T | U> = null
      +

      map function (v, i, x)

      +
      +
    +

    Returns T

    v | v ≥ vᵢ; vᵢ ∈ x

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/maximumEntries.html b/functions/maximumEntries.html new file mode 100644 index 000000000..8cbbd58af --- /dev/null +++ b/functions/maximumEntries.html @@ -0,0 +1,340 @@ +maximumEntries | extra-array
+
+ +
+
+
+
+ +

Function maximumEntries

+
+
    + +
  • +

    Find largest entries.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    • +
    • +

      U = T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      n: number
      +

      number of values

      +
      +
    • +
    • +
      fc: CompareFunction<T | U> = null
      +

      compare function (a, b)

      +
      +
    • +
    • +
      fm: MapFunction<T, T | U> = null
      +

      map function (v, i, x)

      +
      +
    +

    Returns [number, T][]

    n largest entries in descending order

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/maximumEntry.html b/functions/maximumEntry.html new file mode 100644 index 000000000..98f687b66 --- /dev/null +++ b/functions/maximumEntry.html @@ -0,0 +1,335 @@ +maximumEntry | extra-array
+
+ +
+
+
+
+ +

Function maximumEntry

+
+
    + +
  • +

    Find first largest entry.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    • +
    • +

      U = T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      fc: CompareFunction<T | U> = null
      +

      compare function (a, b)

      +
      +
    • +
    • +
      fm: MapFunction<T, T | U> = null
      +

      map function (v, i, x)

      +
      +
    +

    Returns [number, T]

    [max_index, max_value]

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/maximums.html b/functions/maximums.html new file mode 100644 index 000000000..d8edef0f7 --- /dev/null +++ b/functions/maximums.html @@ -0,0 +1,340 @@ +maximums | extra-array
+
+ +
+
+
+
+ +

Function maximums

+
+
    + +
  • +

    Find largest values.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    • +
    • +

      U = T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      n: number
      +

      number of values

      +
      +
    • +
    • +
      fc: CompareFunction<T | U> = null
      +

      compare function (a, b)

      +
      +
    • +
    • +
      fm: MapFunction<T, T | U> = null
      +

      map function (v, i, x)

      +
      +
    +

    Returns T[]

    n largest values in descending order

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/middle.html b/functions/middle.html new file mode 100644 index 000000000..9e52ade59 --- /dev/null +++ b/functions/middle.html @@ -0,0 +1,333 @@ +middle | extra-array
+
+ +
+
+
+
+ +

Function middle

+
+
    + +
  • +

    Get values from middle.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      i: number
      +

      begin index

      +
      +
    • +
    • +
      n: number = 1
      +

      number of values [1]

      +
      +
    +

    Returns T[]

    x[i..i+n]

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/minimum.html b/functions/minimum.html new file mode 100644 index 000000000..b48898925 --- /dev/null +++ b/functions/minimum.html @@ -0,0 +1,335 @@ +minimum | extra-array
+
+ +
+
+
+
+ +

Function minimum

+
+
    + +
  • +

    Find first smallest value.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    • +
    • +

      U = T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      fc: CompareFunction<T | U> = null
      +

      compare function (a, b)

      +
      +
    • +
    • +
      fm: MapFunction<T, T | U> = null
      +

      map function (v, i, x)

      +
      +
    +

    Returns T

    v | v ≤ vᵢ; vᵢ ∈ x

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/minimumEntries.html b/functions/minimumEntries.html new file mode 100644 index 000000000..ee8e1af10 --- /dev/null +++ b/functions/minimumEntries.html @@ -0,0 +1,340 @@ +minimumEntries | extra-array
+
+ +
+
+
+
+ +

Function minimumEntries

+
+
    + +
  • +

    Find smallest entries.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    • +
    • +

      U = T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      n: number
      +

      number of values

      +
      +
    • +
    • +
      fc: CompareFunction<T | U> = null
      +

      compare function (a, b)

      +
      +
    • +
    • +
      fm: MapFunction<T, T | U> = null
      +

      map function (v, i, x)

      +
      +
    +

    Returns [number, T][]

    n smallest entries in ascending order

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/minimumEntry.html b/functions/minimumEntry.html new file mode 100644 index 000000000..fc3bbc932 --- /dev/null +++ b/functions/minimumEntry.html @@ -0,0 +1,335 @@ +minimumEntry | extra-array
+
+ +
+
+
+
+ +

Function minimumEntry

+
+
    + +
  • +

    Find first smallest entry.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    • +
    • +

      U = T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      fc: CompareFunction<T | U> = null
      +

      compare function (a, b)

      +
      +
    • +
    • +
      fm: MapFunction<T, T | U> = null
      +

      map function (v, i, x)

      +
      +
    +

    Returns [number, T]

    [min_index, min_value]

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/minimums.html b/functions/minimums.html new file mode 100644 index 000000000..1756e73ba --- /dev/null +++ b/functions/minimums.html @@ -0,0 +1,340 @@ +minimums | extra-array
+
+ +
+
+
+
+ +

Function minimums

+
+
    + +
  • +

    Find smallest values.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    • +
    • +

      U = T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      n: number
      +

      number of values

      +
      +
    • +
    • +
      fc: CompareFunction<T | U> = null
      +

      compare function (a, b)

      +
      +
    • +
    • +
      fm: MapFunction<T, T | U> = null
      +

      map function (v, i, x)

      +
      +
    +

    Returns T[]

    n smallest values in ascending order

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/moveWithin.html b/functions/moveWithin.html new file mode 100644 index 000000000..f8166aff7 --- /dev/null +++ b/functions/moveWithin.html @@ -0,0 +1,338 @@ +moveWithin | extra-array
+
+ +
+
+
+
+ +

Function moveWithin

+
+
    + +
  • +

    Move part of array within.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      j: number = 0
      +

      write index [0]

      +
      +
    • +
    • +
      i: number = 0
      +

      read begin index [0]

      +
      +
    • +
    • +
      I: number = x.length
      +

      read end index [|x|]

      +
      +
    +

    Returns T[]

    x[0..j] ⧺ x[i..I] ⧺ x[j..i] ⧺ x[I..]

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/moveWithin_.html b/functions/moveWithin_.html new file mode 100644 index 000000000..32fa21d8f --- /dev/null +++ b/functions/moveWithin_.html @@ -0,0 +1,338 @@ +moveWithin$ | extra-array
+
+ +
+
+
+
+ +

Function moveWithin$

+
+
    + +
  • +

    Move part of array within!

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array (updated!)

      +
      +
    • +
    • +
      j: number = 0
      +

      write ±index [0]

      +
      +
    • +
    • +
      i: number = 0
      +

      read begin ±index [0]

      +
      +
    • +
    • +
      I: number = x.length
      +

      read end ±index [|x|]

      +
      +
    +

    Returns T[]

    x = x[0..j] ⧺ x[i..I] ⧺ x[j..i] ⧺ x[I..]

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/partialSort.html b/functions/partialSort.html new file mode 100644 index 000000000..e371bf29e --- /dev/null +++ b/functions/partialSort.html @@ -0,0 +1,345 @@ +partialSort | extra-array
+
+ +
+
+
+
+ +

Function partialSort

+
+
    + +
  • +

    Partially arrange values in order.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    • +
    • +

      U = T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      n: number
      +

      minimum number of values to sort

      +
      +
    • +
    • +
      fc: CompareFunction<T | U> = null
      +

      compare function (a, b)

      +
      +
    • +
    • +
      fm: MapFunction<T, T | U> = null
      +

      map function (v, i, x)

      +
      +
    • +
    • +
      fs: SwapFunction<T> = null
      +

      swap function (x, i, j)

      +
      +
    +

    Returns T[]

    x' | x' = x; x'[i] ≤ x'[j] ∀ i ≤ j

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/partialSort_.html b/functions/partialSort_.html new file mode 100644 index 000000000..6ac9684ed --- /dev/null +++ b/functions/partialSort_.html @@ -0,0 +1,345 @@ +partialSort$ | extra-array
+
+ +
+
+
+
+ +

Function partialSort$

+
+
    + +
  • +

    Partially arrange values in order!

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    • +
    • +

      U = T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array (updated!)

      +
      +
    • +
    • +
      n: number
      +

      minimum number of values to sort

      +
      +
    • +
    • +
      fc: CompareFunction<T | U> = null
      +

      compare function (a, b)

      +
      +
    • +
    • +
      fm: MapFunction<T, T | U> = null
      +

      map function (v, i, x)

      +
      +
    • +
    • +
      fs: SwapFunction<T> = null
      +

      swap function (x, i, j)

      +
      +
    +

    Returns T[]

    x | x[i] ≤ x[j] ∀ i ≤ j

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/partition.html b/functions/partition.html new file mode 100644 index 000000000..18323f44a --- /dev/null +++ b/functions/partition.html @@ -0,0 +1,328 @@ +partition | extra-array
+
+ +
+
+
+
+ +

Function partition

+
+
    + +
  • +

    Segregate values by test result.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      ft: TestFunction<T>
      +

      test function (v, i, x)

      +
      +
    +

    Returns [T[], T[]]

    [satisfies, doesnt]

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/partitionEach.html b/functions/partitionEach.html new file mode 100644 index 000000000..b819f8a2a --- /dev/null +++ b/functions/partitionEach.html @@ -0,0 +1,330 @@ +partitionEach | extra-array
+
+ +
+
+
+
+ +

Function partitionEach

+
+
    + +
  • +

    Segregate each distinct value.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    • +
    • +

      U = T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      fm: MapFunction<T, T | U> = null
      +

      map function (v, i, x)

      +
      +
    +

    Returns Map<T | U, T[]>

    Map {key ⇒ values}

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/permutations.html b/functions/permutations.html new file mode 100644 index 000000000..adfc0f03c --- /dev/null +++ b/functions/permutations.html @@ -0,0 +1,328 @@ +permutations | extra-array
+
+ +
+
+
+
+ +

Function permutations

+
+
    + +
  • +

    Obtain all possible permutations.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      n: number = -1
      +

      number of values [-1 ⇒ any]

      +
      +
    +

    Returns T[][]

    [[], arrangements of length 1, of length 2, ...] if n<0; [only of length n] otherwise

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/pop.html b/functions/pop.html new file mode 100644 index 000000000..bf0f5ad53 --- /dev/null +++ b/functions/pop.html @@ -0,0 +1,323 @@ +pop | extra-array
+
+ +
+
+
+
+ +

Function pop

+
+
    + +
  • +

    Remove last value.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    +

    Returns T[]

    x[0..|x|-1]

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/pop_.html b/functions/pop_.html new file mode 100644 index 000000000..7107d76dd --- /dev/null +++ b/functions/pop_.html @@ -0,0 +1,323 @@ +pop$ | extra-array
+
+ +
+
+
+
+ +

Function pop$

+
+
    + +
  • +

    Remove last value!

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array (updated!)

      +
      +
    +

    Returns T[]

    x = x[0..|x|-1]

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/prefixes.html b/functions/prefixes.html new file mode 100644 index 000000000..15b03f2f5 --- /dev/null +++ b/functions/prefixes.html @@ -0,0 +1,328 @@ +prefixes | extra-array
+
+ +
+
+
+
+ +

Function prefixes

+
+
    + +
  • +

    Obtain all possible prefixes.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      n: number = -1
      +

      number of values [-1 ⇒ any]

      +
      +
    +

    Returns T[][]

    [[], x[..1], x[..2], ...] if n<0; [x[..n]] otherwise

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/push.html b/functions/push.html new file mode 100644 index 000000000..52e8373fb --- /dev/null +++ b/functions/push.html @@ -0,0 +1,328 @@ +push | extra-array
+
+ +
+
+
+
+ +

Function push

+
+
    + +
  • +

    Add value to the end.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      Rest ...vs: T[]
      +

      values to add

      +
      +
    +

    Returns T[]

    x ⧺ vs

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/push_.html b/functions/push_.html new file mode 100644 index 000000000..c01c1dbac --- /dev/null +++ b/functions/push_.html @@ -0,0 +1,328 @@ +push$ | extra-array
+
+ +
+
+
+
+ +

Function push$

+
+
    + +
  • +

    Add values to the end!

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array (updated!)

      +
      +
    • +
    • +
      Rest ...vs: T[]
      +

      values to add

      +
      +
    +

    Returns T[]

    x = x ⧺ vs

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/randomInfix.html b/functions/randomInfix.html new file mode 100644 index 000000000..292fedb5f --- /dev/null +++ b/functions/randomInfix.html @@ -0,0 +1,333 @@ +randomInfix | extra-array
+
+ +
+
+
+
+ +

Function randomInfix

+
+
    + +
  • +

    Pick an arbitrary infix.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      n: number = -1
      +

      number of values [-1 ⇒ any]

      +
      +
    • +
    • +
      fr: ReadFunction<number> = Math.random
      +

      random number generator ([0, 1))

      +
      +
    +

    Returns T[]

    x[i..j] if n<0; x[i..i+n] otherwise | i, j ∈ 0..|x|

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/randomPermutation.html b/functions/randomPermutation.html new file mode 100644 index 000000000..3b974fcfe --- /dev/null +++ b/functions/randomPermutation.html @@ -0,0 +1,333 @@ +randomPermutation | extra-array
+
+ +
+
+
+
+ +

Function randomPermutation

+
+
    + +
  • +

    Pick an arbitrary permutation.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      n: number = -1
      +

      number of values [-1 ⇒ any]

      +
      +
    • +
    • +
      fr: ReadFunction<number> = Math.random
      +

      random number generator ([0, 1))

      +
      +
    +

    Returns T[]

    x' | x' = x; values are randomly shuffled

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/randomPermutation_.html b/functions/randomPermutation_.html new file mode 100644 index 000000000..af3917217 --- /dev/null +++ b/functions/randomPermutation_.html @@ -0,0 +1,333 @@ +randomPermutation$ | extra-array
+
+ +
+
+
+
+ +

Function randomPermutation$

+
+
    + +
  • +

    Pick an arbitrary permutation!

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array (updated!)

      +
      +
    • +
    • +
      n: number = -1
      +

      number of values [-1 ⇒ any]

      +
      +
    • +
    • +
      fr: ReadFunction<number> = Math.random
      +

      random number generator ([0, 1))

      +
      +
    +

    Returns T[]

    x | values are randomly shuffled

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/randomPrefix.html b/functions/randomPrefix.html new file mode 100644 index 000000000..5ddf8ab56 --- /dev/null +++ b/functions/randomPrefix.html @@ -0,0 +1,333 @@ +randomPrefix | extra-array
+
+ +
+
+
+
+ +

Function randomPrefix

+
+
    + +
  • +

    Pick an arbitrary prefix.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      n: number = -1
      +

      number of values [-1 ⇒ any]

      +
      +
    • +
    • +
      fr: ReadFunction<number> = Math.random
      +

      random number generator ([0, 1))

      +
      +
    +

    Returns T[]

    x[..i] if n<0; x[..n] otherwise | i ∈ 0..|x|

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/randomSubsequence.html b/functions/randomSubsequence.html new file mode 100644 index 000000000..4e8604774 --- /dev/null +++ b/functions/randomSubsequence.html @@ -0,0 +1,333 @@ +randomSubsequence | extra-array
+
+ +
+
+
+
+ +

Function randomSubsequence

+
+
    + +
  • +

    Pick an arbitrary subsequence.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      n: number = -1
      +

      number of values [-1 ⇒ any]

      +
      +
    • +
    • +
      fr: ReadFunction<number> = Math.random
      +

      random number generator ([0, 1))

      +
      +
    +

    Returns T[]

    x[i, j, ...] | [i, j, ...] = is; |is| = |x| if n<0 else n

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/randomSuffix.html b/functions/randomSuffix.html new file mode 100644 index 000000000..0a87a8cc2 --- /dev/null +++ b/functions/randomSuffix.html @@ -0,0 +1,333 @@ +randomSuffix | extra-array
+
+ +
+
+
+
+ +

Function randomSuffix

+
+
    + +
  • +

    Pick an arbitrary suffix.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      n: number = -1
      +

      number of values [-1 ⇒ any]

      +
      +
    • +
    • +
      fr: ReadFunction<number> = Math.random
      +

      random number generator ([0, 1))

      +
      +
    +

    Returns T[]

    x[|x|-i..] if n<0; x[|x|-n..] otherwise | i ∈ 0..|x|

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/randomValue.html b/functions/randomValue.html new file mode 100644 index 000000000..6b7936381 --- /dev/null +++ b/functions/randomValue.html @@ -0,0 +1,328 @@ +randomValue | extra-array
+
+ +
+
+
+
+ +

Function randomValue

+
+
    + +
  • +

    Pick an arbitrary value.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      fr: ReadFunction<number> = Math.random
      +

      random number generator ([0, 1))

      +
      +
    +

    Returns T

    x[i] | i ∈ 0..|x|

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/range.html b/functions/range.html new file mode 100644 index 000000000..4aa40c2ae --- /dev/null +++ b/functions/range.html @@ -0,0 +1,335 @@ +range | extra-array
+
+ +
+
+
+
+ +

Function range

+
+
    + +
  • +

    Find smallest and largest values.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    • +
    • +

      U = T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      fc: CompareFunction<T | U> = null
      +

      compare function (a, b)

      +
      +
    • +
    • +
      fm: MapFunction<T, T | U> = null
      +

      map function (v, i, x)

      +
      +
    +

    Returns [T, T]

    [min_value, max_value]

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/rangeEntries.html b/functions/rangeEntries.html new file mode 100644 index 000000000..4606d8c4c --- /dev/null +++ b/functions/rangeEntries.html @@ -0,0 +1,335 @@ +rangeEntries | extra-array
+
+ +
+
+
+
+ +

Function rangeEntries

+
+
    + +
  • +

    Find smallest and largest entries.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    • +
    • +

      U = T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      fc: CompareFunction<T | U> = null
      +

      compare function (a, b)

      +
      +
    • +
    • +
      fm: MapFunction<T, T | U> = null
      +

      map function (v, i, x)

      +
      +
    +

    Returns [[number, T], [number, T]]

    [min_entry, max_entry]

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/rangedPartialSort.html b/functions/rangedPartialSort.html new file mode 100644 index 000000000..0254edb33 --- /dev/null +++ b/functions/rangedPartialSort.html @@ -0,0 +1,355 @@ +rangedPartialSort | extra-array
+
+ +
+
+
+
+ +

Function rangedPartialSort

+
+
    + +
  • +

    Partially arrange a range of values in order.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    • +
    • +

      U = T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      i: number
      +

      begin index

      +
      +
    • +
    • +
      I: number
      +

      end index (exclusive)

      +
      +
    • +
    • +
      n: number
      +

      minimum number of values to sort

      +
      +
    • +
    • +
      fc: CompareFunction<T | U> = null
      +

      compare function (a, b)

      +
      +
    • +
    • +
      fm: MapFunction<T, T | U> = null
      +

      map function (v, i, x)

      +
      +
    • +
    • +
      fs: SwapFunction<T> = null
      +

      swap function (x, i, j)

      +
      +
    +

    Returns T[]

    x' | x' = x; x'[i] ≤ x'[j] ∀ i ≤ j

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/rangedPartialSort_.html b/functions/rangedPartialSort_.html new file mode 100644 index 000000000..b7384353a --- /dev/null +++ b/functions/rangedPartialSort_.html @@ -0,0 +1,355 @@ +rangedPartialSort$ | extra-array
+
+ +
+
+
+
+ +

Function rangedPartialSort$

+
+
    + +
  • +

    Partially arrange a range of values in order!

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    • +
    • +

      U = T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array (updated!)

      +
      +
    • +
    • +
      i: number
      +

      begin index

      +
      +
    • +
    • +
      I: number
      +

      end index (exclusive)

      +
      +
    • +
    • +
      n: number
      +

      minimum number of values to sort

      +
      +
    • +
    • +
      fc: CompareFunction<T | U> = null
      +

      compare function (a, b)

      +
      +
    • +
    • +
      fm: MapFunction<T, T | U> = null
      +

      map function (v, i, x)

      +
      +
    • +
    • +
      fs: SwapFunction<T> = null
      +

      swap function (x, i, j)

      +
      +
    +

    Returns T[]

    x | x[i] ≤ x[j] ∀ i ≤ j

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/rangedSort.html b/functions/rangedSort.html new file mode 100644 index 000000000..8dc132122 --- /dev/null +++ b/functions/rangedSort.html @@ -0,0 +1,350 @@ +rangedSort | extra-array
+
+ +
+
+
+
+ +

Function rangedSort

+
+
    + +
  • +

    Arrange a range of values in order.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    • +
    • +

      U = T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      i: number
      +

      begin index

      +
      +
    • +
    • +
      I: number
      +

      end index (exclusive)

      +
      +
    • +
    • +
      fc: CompareFunction<T | U> = null
      +

      compare function (a, b)

      +
      +
    • +
    • +
      fm: MapFunction<T, T | U> = null
      +

      map function (v, i, x)

      +
      +
    • +
    • +
      fs: SwapFunction<T> = null
      +

      swap function (x, i, j)

      +
      +
    +

    Returns T[]

    x' | x' = x; x'[i] ≤ x'[j] ∀ i ≤ j

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/rangedSort_.html b/functions/rangedSort_.html new file mode 100644 index 000000000..03a6371b3 --- /dev/null +++ b/functions/rangedSort_.html @@ -0,0 +1,350 @@ +rangedSort$ | extra-array
+
+ +
+
+
+
+ +

Function rangedSort$

+
+
    + +
  • +

    Arrange a range of values in order!

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    • +
    • +

      U = T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array (updated!)

      +
      +
    • +
    • +
      i: number
      +

      begin index

      +
      +
    • +
    • +
      I: number
      +

      end index (exclusive)

      +
      +
    • +
    • +
      fc: CompareFunction<T | U> = null
      +

      compare function (a, b)

      +
      +
    • +
    • +
      fm: MapFunction<T, T | U> = null
      +

      map function (v, i, x)

      +
      +
    • +
    • +
      fs: SwapFunction<T> = null
      +

      swap function (x, i, j)

      +
      +
    +

    Returns T[]

    x | x[i] ≤ x[j] ∀ i ≤ j

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/reduce.html b/functions/reduce.html new file mode 100644 index 000000000..e9e061a15 --- /dev/null +++ b/functions/reduce.html @@ -0,0 +1,335 @@ +reduce | extra-array
+
+ +
+
+
+
+ +

Function reduce

+
+
    + +
  • +

    Reduce values of array to a single value.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    • +
    • +

      U = T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      fr: ReduceFunction<T, T | U>
      +

      reduce function (acc, v, i, x)

      +
      +
    • +
    • +
      Optional acc: T | U
      +

      initial value

      +
      +
    +

    Returns T | U

    fr(fr(acc, v₀), v₁)... | fr(acc, v₀) = v₀ if acc not given

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/reduceRight.html b/functions/reduceRight.html new file mode 100644 index 000000000..1be7748d8 --- /dev/null +++ b/functions/reduceRight.html @@ -0,0 +1,335 @@ +reduceRight | extra-array
+
+ +
+
+
+
+ +

Function reduceRight

+
+
    + +
  • +

    Reduce values from right, to a single value.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    • +
    • +

      U = T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      fr: ReduceFunction<T, T | U>
      +

      reduce function (acc, v, i, x)

      +
      +
    • +
    • +
      Optional acc: T | U
      +

      initial value

      +
      +
    +

    Returns T | U

    fr(fr(acc, vₓ₋₀), vₓ₋₁)... | fr(acc, vₓ₋₀) = vₓ₋₀ if acc not given

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/reject.html b/functions/reject.html new file mode 100644 index 000000000..5a27cc8a5 --- /dev/null +++ b/functions/reject.html @@ -0,0 +1,328 @@ +reject | extra-array
+
+ +
+
+
+
+ +

Function reject

+
+
    + +
  • +

    Discard values which pass a test.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      ft: TestFunction<T>
      +

      test function (v, i, x)

      +
      +
    +

    Returns T[]

    [v₀, v₁, ...] | ft(vᵢ) = false; vᵢ ∈ x

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/rejectAt.html b/functions/rejectAt.html new file mode 100644 index 000000000..3e79e839a --- /dev/null +++ b/functions/rejectAt.html @@ -0,0 +1,328 @@ +rejectAt | extra-array
+
+ +
+
+
+
+ +

Function rejectAt

+
+
    + +
  • +

    Discard values at given indices.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      is: number[]
      +

      indices

      +
      +
    +

    Returns T[]

    [v₀, v₁, ...] | vᵢ = x[i]; i ∉ is

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/reject_.html b/functions/reject_.html new file mode 100644 index 000000000..c857f82b7 --- /dev/null +++ b/functions/reject_.html @@ -0,0 +1,328 @@ +reject$ | extra-array
+
+ +
+
+
+
+ +

Function reject$

+
+
    + +
  • +

    Discard values which pass a test!

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array (updated!)

      +
      +
    • +
    • +
      ft: TestFunction<T>
      +

      test function (v, i, x)

      +
      +
    +

    Returns T[]

    x = [v₀, v₁, ...] | ft(vᵢ) = false; vᵢ ∈ x

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/remove.html b/functions/remove.html new file mode 100644 index 000000000..12d17ebef --- /dev/null +++ b/functions/remove.html @@ -0,0 +1,328 @@ +remove | extra-array
+
+ +
+
+
+
+ +

Function remove

+
+
    + +
  • +

    Remove value at index.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      i: number
      +

      index

      +
      +
    +

    Returns T[]

    x[0..i] ⧺ x[i+1..]

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/removePath_.html b/functions/removePath_.html new file mode 100644 index 000000000..6db57e6e8 --- /dev/null +++ b/functions/removePath_.html @@ -0,0 +1,323 @@ +removePath$ | extra-array
+
+ +
+
+
+
+ +

Function removePath$

+
+
    + +
  • +

    Remove value at path in a nested array!

    +
    +
    +

    Parameters

    +
      +
    • +
      x: any[]
      +

      a nested array (updated!)

      +
      +
    • +
    • +
      p: number[]
      +

      path

      +
      +
    +

    Returns any[]

    x \: [i₀][i₁][...] | [i₀, i₁, ...] = p

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/remove_.html b/functions/remove_.html new file mode 100644 index 000000000..66e82d3e9 --- /dev/null +++ b/functions/remove_.html @@ -0,0 +1,328 @@ +remove$ | extra-array
+
+ +
+
+
+
+ +

Function remove$

+
+
    + +
  • +

    Remove value at index!

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array (updated!)

      +
      +
    • +
    • +
      i: number
      +

      index

      +
      +
    +

    Returns T[]

    x \: [i]

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/repeat.html b/functions/repeat.html new file mode 100644 index 000000000..1b345bb55 --- /dev/null +++ b/functions/repeat.html @@ -0,0 +1,328 @@ +repeat | extra-array
+
+ +
+
+
+
+ +

Function repeat

+
+
    + +
  • +

    Repeat an array given times.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      n: number = 1
      +

      times [1]

      +
      +
    +

    Returns T[]

    x ⧺ x ⧺ ...(n times)

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/resize_.html b/functions/resize_.html new file mode 100644 index 000000000..9b049dd64 --- /dev/null +++ b/functions/resize_.html @@ -0,0 +1,333 @@ +resize$ | extra-array
+
+ +
+
+
+
+ +

Function resize$

+
+
    + +
  • +

    Resize an array to given length!

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      n: number
      +

      new length

      +
      +
    • +
    • +
      vd: T
      +

      default value

      +
      +
    +

    Returns T[]

    resized x

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/reverse.html b/functions/reverse.html new file mode 100644 index 000000000..21665d1da --- /dev/null +++ b/functions/reverse.html @@ -0,0 +1,323 @@ +reverse | extra-array
+
+ +
+
+
+
+ +

Function reverse

+
+
    + +
  • +

    Reverse the values.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    +

    Returns T[]

    [x[|x|-1], x[|x|-2], ..., x[1], x[0]]

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/reverse_.html b/functions/reverse_.html new file mode 100644 index 000000000..994fd814c --- /dev/null +++ b/functions/reverse_.html @@ -0,0 +1,323 @@ +reverse$ | extra-array
+
+ +
+
+
+
+ +

Function reverse$

+
+
    + +
  • +

    Reverse the values!

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array (updated!)

      +
      +
    +

    Returns T[]

    x = [x[|x|-1], x[|x|-2], ..., x[1], x[0]]

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/rotate.html b/functions/rotate.html new file mode 100644 index 000000000..c2559b85b --- /dev/null +++ b/functions/rotate.html @@ -0,0 +1,328 @@ +rotate | extra-array
+
+ +
+
+
+
+ +

Function rotate

+
+
    + +
  • +

    Rotate values in array.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      n: number = 0
      +

      rotate amount (+ve: left, -ve: right) [0]

      +
      +
    +

    Returns T[]

    x[n..] ⧺ x[0..n]

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/rotate_.html b/functions/rotate_.html new file mode 100644 index 000000000..dc2adc16a --- /dev/null +++ b/functions/rotate_.html @@ -0,0 +1,328 @@ +rotate$ | extra-array
+
+ +
+
+
+
+ +

Function rotate$

+
+
    + +
  • +

    Rotate values in array!

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array (updated!)

      +
      +
    • +
    • +
      n: number = 0
      +

      rotate amount (+ve: left, -ve: right) [0]

      +
      +
    +

    Returns T[]

    x = x[n..] ⧺ x[0..n]

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/scanUntil.html b/functions/scanUntil.html new file mode 100644 index 000000000..177f934a7 --- /dev/null +++ b/functions/scanUntil.html @@ -0,0 +1,328 @@ +scanUntil | extra-array
+
+ +
+
+
+
+ +

Function scanUntil

+
+
    + +
  • +

    Scan from left, until a test passes.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      ft: TestFunction<T>
      +

      test function (v, i, x)

      +
      +
    +

    Returns number

    first index where test passes

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/scanUntilRight.html b/functions/scanUntilRight.html new file mode 100644 index 000000000..059c69a6e --- /dev/null +++ b/functions/scanUntilRight.html @@ -0,0 +1,328 @@ +scanUntilRight | extra-array
+
+ +
+
+
+
+ +

Function scanUntilRight

+
+
    + +
  • +

    Scan from right, until a test passes.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      ft: TestFunction<T>
      +

      test function (v, i, x)

      +
      +
    +

    Returns number

    first index where test fails till end

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/scanWhile.html b/functions/scanWhile.html new file mode 100644 index 000000000..eb6f0177f --- /dev/null +++ b/functions/scanWhile.html @@ -0,0 +1,328 @@ +scanWhile | extra-array
+
+ +
+
+
+
+ +

Function scanWhile

+
+
    + +
  • +

    Scan from left, while a test passes.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      ft: TestFunction<T>
      +

      test function (v, i, x)

      +
      +
    +

    Returns number

    first index where test fails

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/scanWhileRight.html b/functions/scanWhileRight.html new file mode 100644 index 000000000..872311714 --- /dev/null +++ b/functions/scanWhileRight.html @@ -0,0 +1,328 @@ +scanWhileRight | extra-array
+
+ +
+
+
+
+ +

Function scanWhileRight

+
+
    + +
  • +

    Scan from right, while a test passes.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      ft: TestFunction<T>
      +

      test function (v, i, x)

      +
      +
    +

    Returns number

    first index where test passes till end

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/search.html b/functions/search.html new file mode 100644 index 000000000..10865972f --- /dev/null +++ b/functions/search.html @@ -0,0 +1,328 @@ +search | extra-array
+
+ +
+
+
+
+ +

Function search

+
+
    + +
  • +

    Find index of first value passing a test.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      ft: TestFunction<T>
      +

      test function (v, i, x)

      +
      +
    +

    Returns number

    first index of value, -1 if not found

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/searchAdjacentDuplicateValue.html b/functions/searchAdjacentDuplicateValue.html new file mode 100644 index 000000000..282ebe461 --- /dev/null +++ b/functions/searchAdjacentDuplicateValue.html @@ -0,0 +1,335 @@ +searchAdjacentDuplicateValue | extra-array
+
+ +
+
+
+
+ +

Function searchAdjacentDuplicateValue

+
+
    + +
  • +

    Find first index of an adjacent duplicate value.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    • +
    • +

      U = T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      fc: CompareFunction<T | U> = null
      +

      compare function (a, b)

      +
      +
    • +
    • +
      fm: MapFunction<T, T | U> = null
      +

      map function (v, i, x)

      +
      +
    +

    Returns number

    index of first adjacent duplicate value, -1 if none

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/searchAll.html b/functions/searchAll.html new file mode 100644 index 000000000..05384f89b --- /dev/null +++ b/functions/searchAll.html @@ -0,0 +1,328 @@ +searchAll | extra-array
+
+ +
+
+
+
+ +

Function searchAll

+
+
    + +
  • +

    Find indices of values passing a test.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      ft: TestFunction<T>
      +

      test function (v, i, x)

      +
      +
    +

    Returns number[]

    indices of value

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/searchInfix.html b/functions/searchInfix.html new file mode 100644 index 000000000..d9a249227 --- /dev/null +++ b/functions/searchInfix.html @@ -0,0 +1,340 @@ +searchInfix | extra-array
+
+ +
+
+
+
+ +

Function searchInfix

+
+
    + +
  • +

    Find first index of an infix.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    • +
    • +

      U = T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      y: T[]
      +

      search infix

      +
      +
    • +
    • +
      fc: CompareFunction<T | U> = null
      +

      compare function (a, b)

      +
      +
    • +
    • +
      fm: MapFunction<T, T | U> = null
      +

      map function (v, i, x)

      +
      +
    +

    Returns number

    first i | x[i..i+|y|] = y else -1

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/searchInfixAll.html b/functions/searchInfixAll.html new file mode 100644 index 000000000..3a1c2d755 --- /dev/null +++ b/functions/searchInfixAll.html @@ -0,0 +1,340 @@ +searchInfixAll | extra-array
+
+ +
+
+
+
+ +

Function searchInfixAll

+
+
    + +
  • +

    Find indices of an infix.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    • +
    • +

      U = T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      y: T[]
      +

      search infix

      +
      +
    • +
    • +
      fc: CompareFunction<T | U> = null
      +

      compare function (a, b)

      +
      +
    • +
    • +
      fm: MapFunction<T, T | U> = null
      +

      map function (v, i, x)

      +
      +
    +

    Returns number[]

    i₀, i₁, ... | x[j..j+|y|] = y; j ∈ [i₀, i₁, ...]

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/searchInfixRight.html b/functions/searchInfixRight.html new file mode 100644 index 000000000..2e0005351 --- /dev/null +++ b/functions/searchInfixRight.html @@ -0,0 +1,340 @@ +searchInfixRight | extra-array
+
+ +
+
+
+
+ +

Function searchInfixRight

+
+
    + +
  • +

    Find last index of an infix.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    • +
    • +

      U = T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      y: T[]
      +

      search infix

      +
      +
    • +
    • +
      fc: CompareFunction<T | U> = null
      +

      compare function (a, b)

      +
      +
    • +
    • +
      fm: MapFunction<T, T | U> = null
      +

      map function (v, i, x)

      +
      +
    +

    Returns number

    first i | x[i..i+|y|] = y else -1

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/searchMaximumValue.html b/functions/searchMaximumValue.html new file mode 100644 index 000000000..c167097fb --- /dev/null +++ b/functions/searchMaximumValue.html @@ -0,0 +1,335 @@ +searchMaximumValue | extra-array
+
+ +
+
+
+
+ +

Function searchMaximumValue

+
+
    + +
  • +

    Find first index of maximum value.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    • +
    • +

      U = T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      fc: CompareFunction<T | U> = null
      +

      compare function (a, b)

      +
      +
    • +
    • +
      fm: MapFunction<T, T | U> = null
      +

      map function (v, i, x)

      +
      +
    +

    Returns number

    first index of maximum value, -1 if empty

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/searchMaximumValues.html b/functions/searchMaximumValues.html new file mode 100644 index 000000000..2c9ef2106 --- /dev/null +++ b/functions/searchMaximumValues.html @@ -0,0 +1,340 @@ +searchMaximumValues | extra-array
+
+ +
+
+
+
+ +

Function searchMaximumValues

+
+
    + +
  • +

    Find indices of maximum values.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    • +
    • +

      U = T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      n: number
      +

      number of values

      +
      +
    • +
    • +
      fc: CompareFunction<T | U> = null
      +

      compare function (a, b)

      +
      +
    • +
    • +
      fm: MapFunction<T, T | U> = null
      +

      map function (v, i, x)

      +
      +
    +

    Returns number[]

    indices of maximum values in descending order

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/searchMinimumValue.html b/functions/searchMinimumValue.html new file mode 100644 index 000000000..5c8f263d1 --- /dev/null +++ b/functions/searchMinimumValue.html @@ -0,0 +1,335 @@ +searchMinimumValue | extra-array
+
+ +
+
+
+
+ +

Function searchMinimumValue

+
+
    + +
  • +

    Find first index of minimum value.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    • +
    • +

      U = T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      fc: CompareFunction<T | U> = null
      +

      compare function (a, b)

      +
      +
    • +
    • +
      fm: MapFunction<T, T | U> = null
      +

      map function (v, i, x)

      +
      +
    +

    Returns number

    first index of minimum value, -1 if empty

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/searchMinimumValues.html b/functions/searchMinimumValues.html new file mode 100644 index 000000000..2b760d95a --- /dev/null +++ b/functions/searchMinimumValues.html @@ -0,0 +1,340 @@ +searchMinimumValues | extra-array
+
+ +
+
+
+
+ +

Function searchMinimumValues

+
+
    + +
  • +

    Find indices of minimum values.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    • +
    • +

      U = T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      n: number
      +

      number of values

      +
      +
    • +
    • +
      fc: CompareFunction<T | U> = null
      +

      compare function (a, b)

      +
      +
    • +
    • +
      fm: MapFunction<T, T | U> = null
      +

      map function (v, i, x)

      +
      +
    +

    Returns number[]

    indices of minimum values in ascending order

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/searchMismatchedValue.html b/functions/searchMismatchedValue.html new file mode 100644 index 000000000..5f2a5394b --- /dev/null +++ b/functions/searchMismatchedValue.html @@ -0,0 +1,340 @@ +searchMismatchedValue | extra-array
+
+ +
+
+
+
+ +

Function searchMismatchedValue

+
+
    + +
  • +

    Find first index where two arrays differ.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    • +
    • +

      U = T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      y: T[]
      +

      another array

      +
      +
    • +
    • +
      fc: CompareFunction<T | U> = null
      +

      compare function (a, b)

      +
      +
    • +
    • +
      fm: MapFunction<T, T | U> = null
      +

      map function (v, i, x)

      +
      +
    +

    Returns number

    first index where x[i] ≠ y[i], or -1

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/searchRight.html b/functions/searchRight.html new file mode 100644 index 000000000..e22cc8876 --- /dev/null +++ b/functions/searchRight.html @@ -0,0 +1,328 @@ +searchRight | extra-array
+
+ +
+
+
+
+ +

Function searchRight

+
+
    + +
  • +

    Find index of last value passing a test.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      ft: TestFunction<T>
      +

      test function (v, i, x)

      +
      +
    +

    Returns number

    last index of value, -1 if not found

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/searchSubsequence.html b/functions/searchSubsequence.html new file mode 100644 index 000000000..5fdeba667 --- /dev/null +++ b/functions/searchSubsequence.html @@ -0,0 +1,340 @@ +searchSubsequence | extra-array
+
+ +
+
+
+
+ +

Function searchSubsequence

+
+
    + +
  • +

    Find first index of a subsequence.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    • +
    • +

      U = T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      y: T[]
      +

      search subsequence

      +
      +
    • +
    • +
      fc: CompareFunction<T | U> = null
      +

      compare function (a, b)

      +
      +
    • +
    • +
      fm: MapFunction<T, T | U> = null
      +

      map function (v, i, x)

      +
      +
    +

    Returns number

    begin index of subsequence, -1 if not found

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/searchUnsortedValue.html b/functions/searchUnsortedValue.html new file mode 100644 index 000000000..e7ed1d4e9 --- /dev/null +++ b/functions/searchUnsortedValue.html @@ -0,0 +1,335 @@ +searchUnsortedValue | extra-array
+
+ +
+
+
+
+ +

Function searchUnsortedValue

+
+
    + +
  • +

    Find first index of an unsorted value.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    • +
    • +

      U = T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      fc: CompareFunction<T | U> = null
      +

      compare function (a, b)

      +
      +
    • +
    • +
      fm: MapFunction<T, T | U> = null
      +

      map function (v, i, x)

      +
      +
    +

    Returns number

    index of first unsorted value, -1 if sorted

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/searchValue.html b/functions/searchValue.html new file mode 100644 index 000000000..58a425413 --- /dev/null +++ b/functions/searchValue.html @@ -0,0 +1,340 @@ +searchValue | extra-array
+
+ +
+
+
+
+ +

Function searchValue

+
+
    + +
  • +

    Find first index of a value.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    • +
    • +

      U = T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      v: T
      +

      search value

      +
      +
    • +
    • +
      fc: CompareFunction<T | U> = null
      +

      compare function (a, b)

      +
      +
    • +
    • +
      fm: MapFunction<T, T | U> = null
      +

      map function (v, i, x)

      +
      +
    +

    Returns number

    first index of value, -1 if not found

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/searchValueAll.html b/functions/searchValueAll.html new file mode 100644 index 000000000..e212503f0 --- /dev/null +++ b/functions/searchValueAll.html @@ -0,0 +1,340 @@ +searchValueAll | extra-array
+
+ +
+
+
+
+ +

Function searchValueAll

+
+
    + +
  • +

    Find indices of value.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    • +
    • +

      U = T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      v: T
      +

      search value

      +
      +
    • +
    • +
      fc: CompareFunction<T | U> = null
      +

      compare function (a, b)

      +
      +
    • +
    • +
      fm: MapFunction<T, T | U> = null
      +

      map function (v, i, x)

      +
      +
    +

    Returns number[]

    indices of value

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/searchValueRight.html b/functions/searchValueRight.html new file mode 100644 index 000000000..1039951a5 --- /dev/null +++ b/functions/searchValueRight.html @@ -0,0 +1,340 @@ +searchValueRight | extra-array
+
+ +
+
+
+
+ +

Function searchValueRight

+
+
    + +
  • +

    Find last index of a value.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    • +
    • +

      U = T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      v: T
      +

      search value

      +
      +
    • +
    • +
      fc: CompareFunction<T | U> = null
      +

      compare function (a, b)

      +
      +
    • +
    • +
      fm: MapFunction<T, T | U> = null
      +

      map function (v, i, x)

      +
      +
    +

    Returns number

    last index of value, -1 if not found

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/set.html b/functions/set.html new file mode 100644 index 000000000..28c76eb75 --- /dev/null +++ b/functions/set.html @@ -0,0 +1,333 @@ +set | extra-array
+
+ +
+
+
+
+ +

Function set

+
+
    + +
  • +

    Set value at index.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      i: number
      +

      index

      +
      +
    • +
    • +
      v: T
      +

      value

      +
      +
    +

    Returns T[]

    x' | x' = x; x'[i] = v

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/setPath_.html b/functions/setPath_.html new file mode 100644 index 000000000..a761f989b --- /dev/null +++ b/functions/setPath_.html @@ -0,0 +1,328 @@ +setPath$ | extra-array
+
+ +
+
+
+
+ +

Function setPath$

+
+
    + +
  • +

    Set value at path in a nested array!

    +
    +
    +

    Parameters

    +
      +
    • +
      x: any[]
      +

      a nested array (updated!)

      +
      +
    • +
    • +
      p: number[]
      +

      path

      +
      +
    • +
    • +
      v: any
      +

      value

      +
      +
    +

    Returns any[]

    x | x[i₀][i₁][...] = v; [i₀, i₁, ...] = p

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/set_.html b/functions/set_.html new file mode 100644 index 000000000..671104906 --- /dev/null +++ b/functions/set_.html @@ -0,0 +1,333 @@ +set$ | extra-array
+
+ +
+
+
+
+ +

Function set$

+
+
    + +
  • +

    Set value at index!

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array (updated!)

      +
      +
    • +
    • +
      i: number
      +

      index

      +
      +
    • +
    • +
      v: T
      +

      value

      +
      +
    +

    Returns T[]

    x | x[i] = v

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/shallowClone.html b/functions/shallowClone.html new file mode 100644 index 000000000..e90a05eb1 --- /dev/null +++ b/functions/shallowClone.html @@ -0,0 +1,323 @@ +shallowClone | extra-array
+
+ +
+
+
+
+ +

Function shallowClone

+
+
    + +
  • +

    Shallow clone an array.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    +

    Returns T[]

    shallow clone of x

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/shift.html b/functions/shift.html new file mode 100644 index 000000000..c32f1d4d6 --- /dev/null +++ b/functions/shift.html @@ -0,0 +1,323 @@ +shift | extra-array
+
+ +
+
+
+
+ +

Function shift

+
+
    + +
  • +

    Remove first value.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    +

    Returns T[]

    x[1..]

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/shift_.html b/functions/shift_.html new file mode 100644 index 000000000..8e7d8e192 --- /dev/null +++ b/functions/shift_.html @@ -0,0 +1,323 @@ +shift$ | extra-array
+
+ +
+
+
+
+ +

Function shift$

+
+
    + +
  • +

    Remove first value!

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array (updated!)

      +
      +
    +

    Returns T[]

    x = x[1..]

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/slice.html b/functions/slice.html new file mode 100644 index 000000000..56c5c082b --- /dev/null +++ b/functions/slice.html @@ -0,0 +1,333 @@ +slice | extra-array
+
+ +
+
+
+
+ +

Function slice

+
+
    + +
  • +

    Get part of an array.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      i: number = 0
      +

      begin index [0]

      +
      +
    • +
    • +
      I: number = x.length
      +

      end index [|x|]

      +
      +
    +

    Returns T[]

    x[i..I]

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/slice_.html b/functions/slice_.html new file mode 100644 index 000000000..8f403e860 --- /dev/null +++ b/functions/slice_.html @@ -0,0 +1,333 @@ +slice$ | extra-array
+
+ +
+
+
+
+ +

Function slice$

+
+
    + +
  • +

    Get part of an array!

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array (updated!)

      +
      +
    • +
    • +
      i: number = 0
      +

      begin index [0]

      +
      +
    • +
    • +
      I: number = x.length
      +

      end index [|x|]

      +
      +
    +

    Returns T[]

    x = x[i..I]

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/some.html b/functions/some.html new file mode 100644 index 000000000..5d9ee1ceb --- /dev/null +++ b/functions/some.html @@ -0,0 +1,328 @@ +some | extra-array
+
+ +
+
+
+
+ +

Function some

+
+
    + +
  • +

    Examine if any value satisfies a test.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      ft: TestFunction<T> = null
      +

      test function (v, i, x)

      +
      +
    +

    Returns boolean

    true if ft(vᵢ) = true for some vᵢ ∈ x

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/sort.html b/functions/sort.html new file mode 100644 index 000000000..1c2435212 --- /dev/null +++ b/functions/sort.html @@ -0,0 +1,340 @@ +sort | extra-array
+
+ +
+
+
+
+ +

Function sort

+
+
    + +
  • +

    Arrange values in order.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    • +
    • +

      U = T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      fc: CompareFunction<T | U> = null
      +

      compare function (a, b)

      +
      +
    • +
    • +
      fm: MapFunction<T, T | U> = null
      +

      map function (v, i, x)

      +
      +
    • +
    • +
      fs: SwapFunction<T> = null
      +

      swap function (x, i, j)

      +
      +
    +

    Returns T[]

    x' | x' = x; x'[i] ≤ x'[j] ∀ i ≤ j

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/sort_.html b/functions/sort_.html new file mode 100644 index 000000000..188d1e919 --- /dev/null +++ b/functions/sort_.html @@ -0,0 +1,340 @@ +sort$ | extra-array
+
+ +
+
+
+
+ +

Function sort$

+
+
    + +
  • +

    Arrange values in order!

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    • +
    • +

      U = T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array (updated!)

      +
      +
    • +
    • +
      fc: CompareFunction<T | U> = null
      +

      compare function (a, b)

      +
      +
    • +
    • +
      fm: MapFunction<T, T | U> = null
      +

      map function (v, i, x)

      +
      +
    • +
    • +
      fs: SwapFunction<T> = null
      +

      swap function (x, i, j)

      +
      +
    +

    Returns T[]

    x | x[i] ≤ x[j] ∀ i ≤ j

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/splice.html b/functions/splice.html new file mode 100644 index 000000000..a147b3a02 --- /dev/null +++ b/functions/splice.html @@ -0,0 +1,338 @@ +splice | extra-array
+
+ +
+
+
+
+ +

Function splice

+
+
    + +
  • +

    Remove or replace existing values.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      i: number
      +

      remove ±index

      +
      +
    • +
    • +
      n: number = x.length
      +

      number of values to remove [rest]

      +
      +
    • +
    • +
      Rest ...vs: T[]
      +

      values to insert

      +
      +
    +

    Returns T[]

    x[0..i] ⧺ vs ⧺ x[i+n..]

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/splice_.html b/functions/splice_.html new file mode 100644 index 000000000..6e9e87043 --- /dev/null +++ b/functions/splice_.html @@ -0,0 +1,338 @@ +splice$ | extra-array
+
+ +
+
+
+
+ +

Function splice$

+
+
    + +
  • +

    Remove or replace existing values!

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array (updated!)

      +
      +
    • +
    • +
      i: number
      +

      remove ±index

      +
      +
    • +
    • +
      n: number = x.length
      +

      number of values to remove [rest]

      +
      +
    • +
    • +
      Rest ...vs: T[]
      +

      values to insert

      +
      +
    +

    Returns T[]

    x = x[0..i] ⧺ vs ⧺ x[i+n..]

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/split.html b/functions/split.html new file mode 100644 index 000000000..8b42ef877 --- /dev/null +++ b/functions/split.html @@ -0,0 +1,328 @@ +split | extra-array
+
+ +
+
+
+
+ +

Function split

+
+
    + +
  • +

    Break array considering test as separator.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      ft: TestFunction<T>
      +

      test function (v, i, x)

      +
      +
    +

    Returns T[][]

    [x[j..k], x[l..m], ...] | ft(x[i]) = true; i = 0..j / k..l / ...

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/splitAt.html b/functions/splitAt.html new file mode 100644 index 000000000..d7858b6d9 --- /dev/null +++ b/functions/splitAt.html @@ -0,0 +1,328 @@ +splitAt | extra-array
+
+ +
+
+
+
+ +

Function splitAt

+
+
    + +
  • +

    Break array considering indices as separator.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      is: number[]
      +

      indices (sorted)

      +
      +
    +

    Returns T[][]

    [x[j..k], x[l..m], ...] | ft(x[i]) = true; i = 0..j / k..l / ...; i ∈ is

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/subsequences.html b/functions/subsequences.html new file mode 100644 index 000000000..ae1e6062b --- /dev/null +++ b/functions/subsequences.html @@ -0,0 +1,328 @@ +subsequences | extra-array
+
+ +
+
+
+
+ +

Function subsequences

+
+
    + +
  • +

    Obtain all possible subsequences.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      n: number = -1
      +

      number of values [-1 ⇒ any]

      +
      +
    +

    Returns T[][]

    [elements selected by bit from 0..2^|x|] if n<0; [only of length n] otherwise

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/suffixes.html b/functions/suffixes.html new file mode 100644 index 000000000..508d5c942 --- /dev/null +++ b/functions/suffixes.html @@ -0,0 +1,328 @@ +suffixes | extra-array
+
+ +
+
+
+
+ +

Function suffixes

+
+
    + +
  • +

    Obtain all possible suffixes.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      n: number = -1
      +

      number of values [-1 ⇒ any]

      +
      +
    +

    Returns T[][]

    [x[0..], x[1..], x[2..], ...] if n<0; [x[-n..]] otherwise

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/swap.html b/functions/swap.html new file mode 100644 index 000000000..af08677f5 --- /dev/null +++ b/functions/swap.html @@ -0,0 +1,333 @@ +swap | extra-array
+
+ +
+
+
+
+ +

Function swap

+
+
    + +
  • +

    Exchange two values.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      i: number
      +

      an index

      +
      +
    • +
    • +
      j: number
      +

      another index

      +
      +
    +

    Returns T[]

    x' | x' = x; x'[i] = x[j]; x'[j] = x[i]

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/swapRanges.html b/functions/swapRanges.html new file mode 100644 index 000000000..8ce2a51c6 --- /dev/null +++ b/functions/swapRanges.html @@ -0,0 +1,343 @@ +swapRanges | extra-array
+
+ +
+
+
+
+ +

Function swapRanges

+
+
    + +
  • +

    Exchange two ranges of values.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      i: number
      +

      begin index of first range

      +
      +
    • +
    • +
      I: number
      +

      end index of first range (exclusive)

      +
      +
    • +
    • +
      j: number
      +

      begin index of second range

      +
      +
    • +
    • +
      J: number
      +

      end index of second range (exclusive)

      +
      +
    +

    Returns T[]

    x' | x' = x; x'[i..I] = x[j..J]; x'[j..J] = x[i..I]

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/swapRanges_.html b/functions/swapRanges_.html new file mode 100644 index 000000000..849f3b959 --- /dev/null +++ b/functions/swapRanges_.html @@ -0,0 +1,343 @@ +swapRanges$ | extra-array
+
+ +
+
+
+
+ +

Function swapRanges$

+
+
    + +
  • +

    Exchange two ranges of values!

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array (updated!)

      +
      +
    • +
    • +
      i: number
      +

      begin index of first range

      +
      +
    • +
    • +
      I: number
      +

      end index of first range (exclusive)

      +
      +
    • +
    • +
      j: number
      +

      begin index of second range

      +
      +
    • +
    • +
      J: number
      +

      end index of second range (exclusive)

      +
      +
    +

    Returns T[]

    x | x[i..I] ⇔ x[j..J]

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/swap_.html b/functions/swap_.html new file mode 100644 index 000000000..47def169b --- /dev/null +++ b/functions/swap_.html @@ -0,0 +1,333 @@ +swap$ | extra-array
+
+ +
+
+
+
+ +

Function swap$

+
+
    + +
  • +

    Exchange two values!

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array (updated!)

      +
      +
    • +
    • +
      i: number
      +

      an index

      +
      +
    • +
    • +
      j: number
      +

      another index

      +
      +
    +

    Returns T[]

    x | x[i] ⇔ x[j]

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/symmetricDifference.html b/functions/symmetricDifference.html new file mode 100644 index 000000000..77ab4e50a --- /dev/null +++ b/functions/symmetricDifference.html @@ -0,0 +1,340 @@ +symmetricDifference | extra-array
+
+ +
+
+
+
+ +

Function symmetricDifference

+
+
    + +
  • +

    Obtain values not present in both arrays.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    • +
    • +

      U = T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      y: T[]
      +

      another array

      +
      +
    • +
    • +
      fc: CompareFunction<T | U> = null
      +

      compare function (a, b)

      +
      +
    • +
    • +
      fm: MapFunction<T, T | U> = null
      +

      map function (v, i, x)

      +
      +
    +

    Returns T[]

    x-y ∪ y-x

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/tail.html b/functions/tail.html new file mode 100644 index 000000000..0a2b7c6ba --- /dev/null +++ b/functions/tail.html @@ -0,0 +1,323 @@ +tail | extra-array
+
+ +
+
+
+
+ +

Function tail

+
+
    + +
  • +

    Get values except first.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    +

    Returns T[]

    x[1..|x|]

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/take.html b/functions/take.html new file mode 100644 index 000000000..02db965b3 --- /dev/null +++ b/functions/take.html @@ -0,0 +1,328 @@ +take | extra-array
+
+ +
+
+
+
+ +

Function take

+
+
    + +
  • +

    Keep first n values only.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      n: number = 1
      +

      number of values [1]

      +
      +
    +

    Returns T[]

    x[0..n]

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/takeRight.html b/functions/takeRight.html new file mode 100644 index 000000000..38736bee3 --- /dev/null +++ b/functions/takeRight.html @@ -0,0 +1,328 @@ +takeRight | extra-array
+
+ +
+
+
+
+ +

Function takeRight

+
+
    + +
  • +

    Keep last n values only.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      n: number = 1
      +

      number of values [1]

      +
      +
    +

    Returns T[]

    x[0..n]

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/takeWhile.html b/functions/takeWhile.html new file mode 100644 index 000000000..c7d141f01 --- /dev/null +++ b/functions/takeWhile.html @@ -0,0 +1,328 @@ +takeWhile | extra-array
+
+ +
+
+
+
+ +

Function takeWhile

+
+
    + +
  • +

    Keep values from left, while a test passes.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      ft: TestFunction<T>
      +

      test function (v, i, x)

      +
      +
    +

    Returns T[]

    x[0..T-1] | ft(x[i]) = true ∀ i ∈ [0, T-1] & ft(x[T]) = false

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/takeWhileRight.html b/functions/takeWhileRight.html new file mode 100644 index 000000000..47ff1b410 --- /dev/null +++ b/functions/takeWhileRight.html @@ -0,0 +1,328 @@ +takeWhileRight | extra-array
+
+ +
+
+
+
+ +

Function takeWhileRight

+
+
    + +
  • +

    Keep values from right, while a test passes.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      ft: TestFunction<T>
      +

      test function (v, i, x)

      +
      +
    +

    Returns T[]

    x[T..] | ft(x[i]) = true ∀ i ∈ [T, |x|-1] & ft(x[T-1]) = false

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/union.html b/functions/union.html new file mode 100644 index 000000000..7d18f9a0f --- /dev/null +++ b/functions/union.html @@ -0,0 +1,340 @@ +union | extra-array
+
+ +
+
+
+
+ +

Function union

+
+
    + +
  • +

    Obtain values present in any array.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    • +
    • +

      U = T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      y: T[]
      +

      another array

      +
      +
    • +
    • +
      fc: CompareFunction<T | U> = null
      +

      compare function (a, b)

      +
      +
    • +
    • +
      fm: MapFunction<T, T | U> = null
      +

      map function (v, i, x)

      +
      +
    +

    Returns T[]

    x ∪ y = {v | v ∈ x or v ∈ y}

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/union_.html b/functions/union_.html new file mode 100644 index 000000000..109d8d3d3 --- /dev/null +++ b/functions/union_.html @@ -0,0 +1,340 @@ +union$ | extra-array
+
+ +
+
+
+
+ +

Function union$

+
+
    + +
  • +

    Obtain values present in any array!

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    • +
    • +

      U = T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array (updated!)

      +
      +
    • +
    • +
      y: T[]
      +

      another array

      +
      +
    • +
    • +
      fc: CompareFunction<T | U> = null
      +

      compare function (a, b)

      +
      +
    • +
    • +
      fm: MapFunction<T, T | U> = null
      +

      map function (v, i, x)

      +
      +
    +

    Returns T[]

    x = x ∪ y = {v | v ∈ x or v ∈ y}

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/unique.html b/functions/unique.html new file mode 100644 index 000000000..db57548b7 --- /dev/null +++ b/functions/unique.html @@ -0,0 +1,335 @@ +unique | extra-array
+
+ +
+
+
+
+ +

Function unique

+
+
    + +
  • +

    Remove duplicate values.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    • +
    • +

      U = T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    • +
    • +
      fc: CompareFunction<T | U> = null
      +

      compare function (a, b)

      +
      +
    • +
    • +
      fm: MapFunction<T, T | U> = null
      +

      map function (v, i, x)

      +
      +
    +

    Returns T[]

    v₀, v₁, ... | vᵢ ∈ x; vᵢ ≠ vⱼ ∀ i, j

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/unshift.html b/functions/unshift.html new file mode 100644 index 000000000..89127147f --- /dev/null +++ b/functions/unshift.html @@ -0,0 +1,328 @@ +unshift | extra-array
+
+ +
+
+
+
+ +

Function unshift

+
+
    + +
  • +

    Add values to the start.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: Iterable<T>
      +

      an array

      +
      +
    • +
    • +
      Rest ...vs: T[]
      +

      values to add

      +
      +
    +

    Returns T[]

    vs ⧺ x

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/unshift_.html b/functions/unshift_.html new file mode 100644 index 000000000..3db3701cf --- /dev/null +++ b/functions/unshift_.html @@ -0,0 +1,328 @@ +unshift$ | extra-array
+
+ +
+
+
+
+ +

Function unshift$

+
+
    + +
  • +

    Add values to the start!

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array (updated!)

      +
      +
    • +
    • +
      Rest ...vs: T[]
      +

      values to add

      +
      +
    +

    Returns T[]

    x = vs ⧺ x

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/values.html b/functions/values.html new file mode 100644 index 000000000..6c89f40f6 --- /dev/null +++ b/functions/values.html @@ -0,0 +1,323 @@ +values | extra-array
+
+ +
+
+
+
+ +

Function values

+
+
    + +
  • +

    Get all values.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      x: T[]
      +

      an array

      +
      +
    +

    Returns T[]

    [v₀, v₁, ...] | vᵢ = x[i]

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/functions/zip.html b/functions/zip.html new file mode 100644 index 000000000..99e5ee4cd --- /dev/null +++ b/functions/zip.html @@ -0,0 +1,340 @@ +zip | extra-array
+
+ +
+
+
+
+ +

Function zip

+
+
    + +
  • +

    Combine values from arrays.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    • +
    • +

      U = T[]

    +
    +

    Parameters

    +
      +
    • +
      xs: T[][]
      +

      arrays

      +
      +
    • +
    • +
      fm: MapFunction<T[], U | T[]> = null
      +

      map function (vs, i)

      +
      +
    • +
    • +
      fe: EndFunction = null
      +

      end function (dones) [some]

      +
      +
    • +
    • +
      Optional vd: T
      +

      default value

      +
      +
    +

    Returns (T[] | U)[]

    [fm([x₀[0], x₁[0], ...]), fm([x₀[1], x₁[1], ...]), ...]

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 000000000..bf1bff20b --- /dev/null +++ b/index.html @@ -0,0 +1,1224 @@ +extra-array
+
+ +
+
+
+
+

extra-array

+

An array is a collection of values, stored contiguously.
+📦 Node.js, +🌐 Web, +📜 Files, +📰 Docs, +📘 Wiki.

+
+ + +

This package includes comprehensive set of array functions with which you can +generate an array, clone it, query about it, get non-negative +indices, manage its length, get/set elements, fully or partially +sort it, obtain minimum(s)/maximum(s), compare it with another +array, get a part of it, search a value, obtain all possible +arrangements or random arrangements, find an element, take/drop +elements or scan from its beginning or its end, search the index of a +part of it, perform functional operations, flatten multi-level arrays, +obtain prefix sum, manipulate it in various ways, count/partition +elements, split it, concatenate/join multiple arrays, rearrange +elements within it, or performing set operations upon it.

+

We use a consistent naming scheme that helps you quickly identify the functions +you need. All functions except from*() take array as 1st parameter. Some +functions operate on a specified range in the array and are called ranged*(), +such as rangedPartialSort(). Functions like swap() are pure and do not +modify the array itself, while functions like swap$() do modify (update) the +array itself. Some functions accept a map function for faster comparison, such +as unique(). Further, functions which return an iterable instead of an array +are prefixed with i, such as isubsequences(). We borrow some names from +other programming languages such as Haskell, Python, Java, and +Processing.

+

With this package, you can simplify the implementation of complex algorithms, +and be able to achieve your goals faster, regardless of your level of expertise. +Try it out today and discover how it can transform your development experience! +This package is available in Node.js and Web formats. To use it on the web, +simply use the extra_array global variable after loading with a <script> tag +from the jsDelivr CDN.

+
+

Stability: Experimental.

+
+
+

NOTE: The use of negative indices in certain functions such as slice() is +provided as a convenience for access elements from the end of the array. +However, negative indices can be thought of as referring to a virtual mirrored +version of the original array, which can be counter-intuitive and make it +harder to reason about the behavior of functions that use them. We are working +on a solution to this problem. Any suggestions are welcome.

+
+
+ +
const xarray = require('extra-array');
// import * as xarray from "extra-array";
// import * as xarray from "https://unpkg.com/extra-array/index.mjs"; (deno)

var x = [1, 2, 3];
xarray.get(x, -1);
// → 3

var x = [1, 2, 3, 4];
xarray.swap(x, 0, 1);
// → [ 2, 1, 3, 4 ]

var x = [1, 2, 3, 4];
xarray.rotate(x, 1);
// → [ 2, 3, 4, 1 ]

xarray.permutations([1, 2, 3]);
// → [
// [], [ 1 ],
// [ 2 ], [ 3 ],
// [ 1, 2 ], [ 1, 3 ],
// [ 2, 1 ], [ 2, 3 ],
// [ 3, 1 ], [ 3, 2 ],
// [ 1, 2, 3 ], [ 1, 3, 2 ],
// [ 2, 1, 3 ], [ 2, 3, 1 ],
// [ 3, 1, 2 ], [ 3, 2, 1 ]
// ] +
+
+
+ + + +

Index

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PropertyDescription
fromRangeGenerate array from given number range.
fromInvocationGenerate array from repeated function invocation.
fromApplicationGenerate array from repeated function application.
fromIterableConvert an iterable to array.
fromIterable$Convert an iterable to array!
shallowCloneShallow clone an array.
deepCloneDeep clone an array.
isCheck if value is an array.
keysObtain all indices.
valuesGet all values.
entriesObtain all index-value pairs.
indexGet zero-based index for an element in array.
indexRangeGet zero-based index range for part of array.
isEmptyCheck if an array is empty.
lengthFind the length of an array.
resize$Resize an array to given length!
clear$Remove all elements from an array!
getGet value at index.
getAllGet values at indices.
getPathGet value at path in a nested array.
hasPathCheck if nested array has a path.
setSet value at index.
set$Set value at index!
setPath$Set value at path in a nested array!
swapExchange two values.
swap$Exchange two values!
swapRangesExchange two ranges of values.
swapRanges$Exchange two ranges of values!
removeRemove value at index.
remove$Remove value at index!
removePath$Remove value at path in a nested array!
isSortedExamine if array is sorted.
hasUnsortedValueExamine if array has an unsorted value.
searchUnsortedValueFind first index of an unsorted value.
sortArrange values in order.
sort$Arrange values in order!
partialSortPartially arrange values in order.
partialSort$Partially arrange values in order!
minimumFind first smallest value.
minimumEntryFind first smallest entry.
maximumFind first largest value.
maximumEntryFind first largest entry.
rangeFind smallest and largest values.
rangeEntriesFind smallest and largest entries.
minimumsFind smallest values.
minimumEntriesFind smallest entries.
maximumsFind largest values.
maximumEntriesFind largest entries.
searchMinimumValueFind first index of minimum value.
searchMaximumValueFind first index of maximum value.
searchMinimumValuesFind indices of minimum values.
searchMaximumValuesFind indices of maximum values.
isEqualExamine if two arrays are equal.
compareCompare two arrays (lexicographically).
headGet first value.
tailGet values except first.
initGet values except last.
lastGet last value.
middleGet values from middle.
sliceGet part of an array.
slice$Get part of an array!
includesCheck if array has a value.
hasValueExamine if array has a value.
searchValueFind first index of a value.
searchValueRightFind last index of a value.
searchValueAllFind indices of value.
searchAdjacentDuplicateValueFind first index of an adjacent duplicate value.
searchMismatchedValueFind first index where two arrays differ.
hasPrefixExamine if array starts with a prefix.
hasSuffixExamine if array ends with a suffix.
hasInfixExamine if array contains an infix.
hasSubsequenceExamine if array has a subsequence.
hasPermutationExamine if array has a permutation.
prefixesObtain all possible prefixes.
suffixesObtain all possible suffixes.
infixesObtain all possible infixes.
subsequencesObtain all possible subsequences.
permutationsObtain all possible permutations.
searchInfixFind first index of an infix.
searchInfixRightFind last index of an infix.
searchInfixAllFind indices of an infix.
searchSubsequenceFind first index of a subsequence.
randomValuePick an arbitrary value.
randomPrefixPick an arbitrary prefix.
randomSuffixPick an arbitrary suffix.
randomInfixPick an arbitrary infix.
randomSubsequencePick an arbitrary subsequence.
randomPermutationPick an arbitrary permutation.
randomPermutation$Pick an arbitrary permutation!
findFind first value passing a test.
findRightFind last value passing a test.
takeKeep first n values only.
takeRightKeep last n values only.
takeWhileKeep values from left, while a test passes.
takeWhileRightKeep values from right, while a test passes.
dropDiscard first n values only.
dropRightDiscard last n values only.
dropWhileDiscard values from left, while a test passes.
dropWhileRightDiscard values from right, while a test passes.
scanWhileScan from left, while a test passes.
scanWhileRightScan from right, while a test passes.
scanUntilScan from left, until a test passes.
scanUntilRightScan from right, until a test passes.
indexOfFind first index of a value.
lastIndexOfFind last index of a value.
searchFind index of first value passing a test.
searchRightFind index of last value passing a test.
searchAllFind indices of values passing a test.
forEachCall a function for each value.
someExamine if any value satisfies a test.
everyExamine if all values satisfy a test.
mapTransform values of an array.
map$Transform values of an array!
reduceReduce values of array to a single value.
reduceRightReduce values from right, to a single value.
filterKeep values which pass a test.
filter$Keep values which pass a test!
filterAtKeep values at given indices.
rejectDiscard values which pass a test.
reject$Discard values which pass a test!
rejectAtDiscard values at given indices.
flatFlatten nested array to given depth.
flatMapFlatten nested array, based on map function.
exclusiveScanPerform exclusive prefix scan from left to right.
exclusiveScan$Perform exclusive prefix scan from left to right!
inclusiveScanPerform inclusive prefix scan from left to right.
inclusiveScan$Perform inclusive prefix scan from left to right!
adjacentCombineCombine adjacent values of an array.
adjacentCombine$Combine adjacent values of an array!
interspersePlace a separator between every value.
interpolateEstimate new values between existing ones.
intermixPlace values of an array between another.
interleavePlace values from iterables alternately.
zipCombine values from arrays.
fillFill with given value.
fill$Fill with given value!
pushAdd value to the end.
push$Add values to the end!
popRemove last value.
pop$Remove last value!
shiftRemove first value.
shift$Remove first value!
unshiftAdd values to the start.
unshift$Add values to the start!
copyCopy part of array to another.
copy$Copy part of array to another!
copyWithinCopy part of array within.
copyWithin$Copy part of array within!
moveWithinMove part of array within.
moveWithin$Move part of array within!
spliceRemove or replace existing values.
splice$Remove or replace existing values!
countCount values which satisfy a test.
countEachCount occurrences of each distinct value.
partitionSegregate values by test result.
partitionEachSegregate each distinct value.
splitBreak array considering test as separator.
splitAtBreak array considering indices as separator.
cutBreak array when test passes.
cutRightBreak array after test passes.
cutAtBreak array at given indices.
cutAtRightBreak array after given indices.
groupKeep similar values together and in order.
chunkBreak array into chunks of given size.
concatAppend values from arrays.
concat$Append values from arrays!
joinJoin values together into a string.
cycleObtain values that cycle through array.
repeatRepeat an array given times.
reverseReverse the values.
reverse$Reverse the values!
rotateRotate values in array.
rotate$Rotate values in array!
isUniqueExamine if there are no duplicate values.
isDisjointExamine if arrays have no value in common.
uniqueRemove duplicate values.
unionObtain values present in any array.
union$Obtain values present in any array!
intersectionObtain values present in both arrays.
differenceObtain values not present in another array.
symmetricDifferenceObtain values not present in both arrays.
cartesianProductObtain cartesian product of arrays.
+
+
+ + +

References

+
+
+ + +


+ORG +DOI +Coverage Status +Test Coverage +

+
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/jest.config.js b/jest.config.js deleted file mode 100644 index ce9d23856..000000000 --- a/jest.config.js +++ /dev/null @@ -1,8 +0,0 @@ -module.exports = { - collectCoverage: true, - coverageDirectory: "coverage", - coverageProvider: "v8", - transform: { - "^.+\\.(t|j)sx?$": "ts-jest" - }, -}; diff --git a/modules.html b/modules.html new file mode 100644 index 000000000..6b0ce194d --- /dev/null +++ b/modules.html @@ -0,0 +1,739 @@ +extra-array
+
+ +
+
+
+
+

extra-array

+
+
+
+ +
+
+

References

+
+
+

Type Aliases

+
+
+

Functions

+
adjacentCombine +adjacentCombine$ +cartesianProduct +chunk +clear$ +compare +concat +concat$ +copy +copy$ +copyWithin +copyWithin$ +count +countEach +cut +cutAt +cutAtRight +cutRight +cycle +deepClone +difference +drop +dropRight +dropWhile +dropWhileRight +entries +every +exclusiveScan +exclusiveScan$ +fill +fill$ +filter +filter$ +filterAt +find +findRight +flat +flatMap +forEach +fromApplication +fromInvocation +fromIterable +fromIterable$ +fromRange +get +getAll +getPath +group +hasInfix +hasPath +hasPermutation +hasPrefix +hasSubsequence +hasSuffix +hasUnsortedValue +hasValue +head +ientries +iinfixes +ikeys +includes +inclusiveScan +inclusiveScan$ +index +indexOf +indexRange +infixes +init +interleave +intermix +interpolate +intersection +intersperse +ipermutations +iprefixes +is +isDisjoint +isEmpty +isEqual +isSorted +isUnique +isubsequences +isuffixes +ivalues +join +keys +last +lastIndexOf +length +map +map$ +maximum +maximumEntries +maximumEntry +maximums +middle +minimum +minimumEntries +minimumEntry +minimums +moveWithin +moveWithin$ +partialSort +partialSort$ +partition +partitionEach +permutations +pop +pop$ +prefixes +push +push$ +randomInfix +randomPermutation +randomPermutation$ +randomPrefix +randomSubsequence +randomSuffix +randomValue +range +rangeEntries +rangedPartialSort +rangedPartialSort$ +rangedSort +rangedSort$ +reduce +reduceRight +reject +reject$ +rejectAt +remove +remove$ +removePath$ +repeat +resize$ +reverse +reverse$ +rotate +rotate$ +scanUntil +scanUntilRight +scanWhile +scanWhileRight +search +searchAdjacentDuplicateValue +searchAll +searchInfix +searchInfixAll +searchInfixRight +searchMaximumValue +searchMaximumValues +searchMinimumValue +searchMinimumValues +searchMismatchedValue +searchRight +searchSubsequence +searchUnsortedValue +searchValue +searchValueAll +searchValueRight +set +set$ +setPath$ +shallowClone +shift +shift$ +slice +slice$ +some +sort +sort$ +splice +splice$ +split +splitAt +subsequences +suffixes +swap +swap$ +swapRanges +swapRanges$ +symmetricDifference +tail +take +takeRight +takeWhile +takeWhileRight +union +union$ +unique +unshift +unshift$ +values +zip +
+
+

References

+
+Renames and re-exports inclusiveScan
+
+Renames and re-exports every
+
+Renames and re-exports some
+
+Renames and re-exports push
+
+Renames and re-exports push$
+
+Renames and re-exports get
+
+Renames and re-exports last
+
+Renames and re-exports shallowClone
+
+Renames and re-exports countEach
+
+Renames and re-exports hasSuffix
+
+Renames and re-exports filter
+
+Renames and re-exports search
+
+Renames and re-exports searchRight
+
+Renames and re-exports head
+
+Renames and re-exports fromIterable
+
+Renames and re-exports fromIterable$
+
+Renames and re-exports fromApplication
+
+Renames and re-exports fromInvocation
+
+Renames and re-exports head
+
+Renames and re-exports partitionEach
+
+Renames and re-exports randomInfix
+
+Renames and re-exports take
+
+Renames and re-exports maximum
+
+Renames and re-exports maximumEntry
+
+Renames and re-exports minimum
+
+Renames and re-exports minimumEntry
+
+Renames and re-exports partitionEach
+
+Renames and re-exports randomPermutation
+
+Renames and re-exports randomPermutation$
+
+Renames and re-exports randomPermutation$
+
+Renames and re-exports pop
+
+Renames and re-exports pop
+
+Renames and re-exports shift
+
+Renames and re-exports shift$
+
+Renames and re-exports randomPrefix
+
+Renames and re-exports unshift
+
+Renames and re-exports unshift$
+
+Renames and re-exports push
+
+Renames and re-exports push$
+
+Renames and re-exports unshift
+
+Renames and re-exports unshift$
+
+Renames and re-exports takeRight
+
+Renames and re-exports searchAdjacentDuplicateValue
+
+Renames and re-exports searchMismatchedValue
+
+Renames and re-exports randomPermutation$
+
+Renames and re-exports length
+
+Renames and re-exports hasPrefix
+
+Renames and re-exports randomSubsequence
+
+Renames and re-exports randomSuffix
+
+Renames and re-exports reverse
+
+Renames and re-exports sort
+
+Renames and re-exports splice
+
+Renames and re-exports randomValue
+
+Renames and re-exports set
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index bde3abac7..000000000 --- a/package-lock.json +++ /dev/null @@ -1,5062 +0,0 @@ -{ - "name": "extra-array", - "version": "4.3.0", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "extra-array", - "version": "4.3.0", - "license": "MIT", - "devDependencies": { - "@rollup/plugin-commonjs": "^25.0.8", - "@rollup/plugin-node-resolve": "^15.3.0", - "@types/jest": "^29.5.13", - "extra-build": "^2.2.46", - "extra-function": "^1.3.1", - "extra-math": "^1.5.0", - "jest": "^29.7.0", - "rollup-plugin-cleanup": "^3.2.1", - "rollup-plugin-dts": "^6.1.1", - "ts-jest": "^29.2.5" - } - }, - "node_modules/@ampproject/remapping": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", - "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.24" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/code-frame": { - "version": "7.26.2", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz", - "integrity": "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-validator-identifier": "^7.25.9", - "js-tokens": "^4.0.0", - "picocolors": "^1.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/compat-data": { - "version": "7.26.8", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.26.8.tgz", - "integrity": "sha512-oH5UPLMWR3L2wEFLnFJ1TZXqHufiTKAiLfqw5zkhS4dKXLJ10yVztfil/twG8EDTA4F/tvVNw9nOl4ZMslB8rQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/core": { - "version": "7.26.8", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.26.8.tgz", - "integrity": "sha512-l+lkXCHS6tQEc5oUpK28xBOZ6+HwaH7YwoYQbLFiYb4nS2/l1tKnZEtEWkD0GuiYdvArf9qBS0XlQGXzPMsNqQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.26.2", - "@babel/generator": "^7.26.8", - "@babel/helper-compilation-targets": "^7.26.5", - "@babel/helper-module-transforms": "^7.26.0", - "@babel/helpers": "^7.26.7", - "@babel/parser": "^7.26.8", - "@babel/template": "^7.26.8", - "@babel/traverse": "^7.26.8", - "@babel/types": "^7.26.8", - "@types/gensync": "^1.0.0", - "convert-source-map": "^2.0.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.2.3", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/babel" - } - }, - "node_modules/@babel/core/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/@babel/generator": { - "version": "7.26.8", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.26.8.tgz", - "integrity": "sha512-ef383X5++iZHWAXX0SXQR6ZyQhw/0KtTkrTz61WXRhFM6dhpHulO/RJz79L8S6ugZHJkOOkUrUdxgdF2YiPFnA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/parser": "^7.26.8", - "@babel/types": "^7.26.8", - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.25", - "jsesc": "^3.0.2" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-compilation-targets": { - "version": "7.26.5", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.26.5.tgz", - "integrity": "sha512-IXuyn5EkouFJscIDuFF5EsiSolseme1s0CZB+QxVugqJLYmKdxI1VfIBOst0SUu4rnk2Z7kqTwmoO1lp3HIfnA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/compat-data": "^7.26.5", - "@babel/helper-validator-option": "^7.25.9", - "browserslist": "^4.24.0", - "lru-cache": "^5.1.1", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-compilation-targets/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/@babel/helper-module-imports": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.25.9.tgz", - "integrity": "sha512-tnUA4RsrmflIM6W6RFTLFSXITtl0wKjgpnLgXyowocVPrbYrLUXSBXDgTs8BlbmIzIdlBySRQjINYs2BAkiLtw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/traverse": "^7.25.9", - "@babel/types": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-transforms": { - "version": "7.26.0", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.26.0.tgz", - "integrity": "sha512-xO+xu6B5K2czEnQye6BHA7DolFFmS3LB7stHZFaOLb1pAwO1HWLS8fXA+eh0A2yIvltPVmx3eNNDBJA2SLHXFw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-module-imports": "^7.25.9", - "@babel/helper-validator-identifier": "^7.25.9", - "@babel/traverse": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-plugin-utils": { - "version": "7.26.5", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.26.5.tgz", - "integrity": "sha512-RS+jZcRdZdRFzMyr+wcsaqOmld1/EqTghfaBGQQd/WnRdzdlvSZ//kF7U8VQTxf1ynZ4cjUcYgjVGx13ewNPMg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-string-parser": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz", - "integrity": "sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-identifier": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", - "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-option": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.25.9.tgz", - "integrity": "sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helpers": { - "version": "7.26.7", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.26.7.tgz", - "integrity": "sha512-8NHiL98vsi0mbPQmYAGWwfcFaOy4j2HY49fXJCfuDcdE7fMIsH9a7GdaeXpIBsbT7307WU8KCMp5pUVDNL4f9A==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/template": "^7.25.9", - "@babel/types": "^7.26.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/parser": { - "version": "7.26.8", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.8.tgz", - "integrity": "sha512-TZIQ25pkSoaKEYYaHbbxkfL36GNsQ6iFiBbeuzAkLnXayKR1yP1zFe+NxuZWWsUyvt8icPU9CCq0sgWGXR1GEw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.26.8" - }, - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/plugin-syntax-async-generators": { - "version": "7.8.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", - "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-bigint": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", - "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-class-properties": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", - "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.12.13" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-class-static-block": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", - "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-import-attributes": { - "version": "7.26.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.26.0.tgz", - "integrity": "sha512-e2dttdsJ1ZTpi3B9UYGLw41hifAubg19AtCu/2I/F1QNVclOBr1dYpTdmdyZ84Xiz43BS/tCUkMAZNLv12Pi+A==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-import-meta": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", - "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-json-strings": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", - "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-jsx": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.25.9.tgz", - "integrity": "sha512-ld6oezHQMZsZfp6pWtbjaNDF2tiiCYYDqQszHt5VV437lewP9aSi2Of99CK0D0XB21k7FLgnLcmQKyKzynfeAA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-logical-assignment-operators": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", - "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", - "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-numeric-separator": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", - "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-object-rest-spread": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", - "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-optional-catch-binding": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", - "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-optional-chaining": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", - "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-private-property-in-object": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", - "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-top-level-await": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", - "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-typescript": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.25.9.tgz", - "integrity": "sha512-hjMgRy5hb8uJJjUcdWunWVcoi9bGpJp8p5Ol1229PoN6aytsLwNMgmdftO23wnCLMfVmTwZDWMPNq/D1SY60JQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/template": { - "version": "7.26.8", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.26.8.tgz", - "integrity": "sha512-iNKaX3ZebKIsCvJ+0jd6embf+Aulaa3vNBqZ41kM7iTWjx5qzWKXGHiJUW3+nTpQ18SG11hdF8OAzKrpXkb96Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.26.2", - "@babel/parser": "^7.26.8", - "@babel/types": "^7.26.8" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/traverse": { - "version": "7.26.8", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.26.8.tgz", - "integrity": "sha512-nic9tRkjYH0oB2dzr/JoGIm+4Q6SuYeLEiIiZDwBscRMYFJ+tMAz98fuel9ZnbXViA2I0HVSSRRK8DW5fjXStA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.26.2", - "@babel/generator": "^7.26.8", - "@babel/parser": "^7.26.8", - "@babel/template": "^7.26.8", - "@babel/types": "^7.26.8", - "debug": "^4.3.1", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/types": { - "version": "7.26.8", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.8.tgz", - "integrity": "sha512-eUuWapzEGWFEpHFxgEaBG8e3n6S8L3MSu0oda755rOfabWPnh0Our1AozNFVUxGFIhbKgd1ksprsoDGMinTOTA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.25.9", - "@babel/helper-validator-identifier": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@bcoe/v8-coverage": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", - "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", - "dev": true, - "license": "MIT" - }, - "node_modules/@istanbuljs/load-nyc-config": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", - "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", - "dev": true, - "license": "ISC", - "dependencies": { - "camelcase": "^5.3.1", - "find-up": "^4.1.0", - "get-package-type": "^0.1.0", - "js-yaml": "^3.13.1", - "resolve-from": "^5.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@istanbuljs/schema": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", - "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/@jest/console": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.7.0.tgz", - "integrity": "sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^29.6.3", - "@types/node": "*", - "chalk": "^4.0.0", - "jest-message-util": "^29.7.0", - "jest-util": "^29.7.0", - "slash": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/core": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.7.0.tgz", - "integrity": "sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/console": "^29.7.0", - "@jest/reporters": "^29.7.0", - "@jest/test-result": "^29.7.0", - "@jest/transform": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "exit": "^0.1.2", - "graceful-fs": "^4.2.9", - "jest-changed-files": "^29.7.0", - "jest-config": "^29.7.0", - "jest-haste-map": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-regex-util": "^29.6.3", - "jest-resolve": "^29.7.0", - "jest-resolve-dependencies": "^29.7.0", - "jest-runner": "^29.7.0", - "jest-runtime": "^29.7.0", - "jest-snapshot": "^29.7.0", - "jest-util": "^29.7.0", - "jest-validate": "^29.7.0", - "jest-watcher": "^29.7.0", - "micromatch": "^4.0.4", - "pretty-format": "^29.7.0", - "slash": "^3.0.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "node_modules/@jest/environment": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.7.0.tgz", - "integrity": "sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/fake-timers": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "jest-mock": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/expect": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.7.0.tgz", - "integrity": "sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "expect": "^29.7.0", - "jest-snapshot": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/expect-utils": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.7.0.tgz", - "integrity": "sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA==", - "dev": true, - "license": "MIT", - "dependencies": { - "jest-get-type": "^29.6.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/fake-timers": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.7.0.tgz", - "integrity": "sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^29.6.3", - "@sinonjs/fake-timers": "^10.0.2", - "@types/node": "*", - "jest-message-util": "^29.7.0", - "jest-mock": "^29.7.0", - "jest-util": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/globals": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.7.0.tgz", - "integrity": "sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/environment": "^29.7.0", - "@jest/expect": "^29.7.0", - "@jest/types": "^29.6.3", - "jest-mock": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/reporters": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.7.0.tgz", - "integrity": "sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^29.7.0", - "@jest/test-result": "^29.7.0", - "@jest/transform": "^29.7.0", - "@jest/types": "^29.6.3", - "@jridgewell/trace-mapping": "^0.3.18", - "@types/node": "*", - "chalk": "^4.0.0", - "collect-v8-coverage": "^1.0.0", - "exit": "^0.1.2", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-instrument": "^6.0.0", - "istanbul-lib-report": "^3.0.0", - "istanbul-lib-source-maps": "^4.0.0", - "istanbul-reports": "^3.1.3", - "jest-message-util": "^29.7.0", - "jest-util": "^29.7.0", - "jest-worker": "^29.7.0", - "slash": "^3.0.0", - "string-length": "^4.0.1", - "strip-ansi": "^6.0.0", - "v8-to-istanbul": "^9.0.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "node_modules/@jest/reporters/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/@jest/reporters/node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/@jest/reporters/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/@jest/schemas": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", - "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@sinclair/typebox": "^0.27.8" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/source-map": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.6.3.tgz", - "integrity": "sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/trace-mapping": "^0.3.18", - "callsites": "^3.0.0", - "graceful-fs": "^4.2.9" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/test-result": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.7.0.tgz", - "integrity": "sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/console": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "collect-v8-coverage": "^1.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/test-sequencer": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz", - "integrity": "sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/test-result": "^29.7.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.7.0", - "slash": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/transform": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.7.0.tgz", - "integrity": "sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/core": "^7.11.6", - "@jest/types": "^29.6.3", - "@jridgewell/trace-mapping": "^0.3.18", - "babel-plugin-istanbul": "^6.1.1", - "chalk": "^4.0.0", - "convert-source-map": "^2.0.0", - "fast-json-stable-stringify": "^2.1.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.7.0", - "jest-regex-util": "^29.6.3", - "jest-util": "^29.7.0", - "micromatch": "^4.0.4", - "pirates": "^4.0.4", - "slash": "^3.0.0", - "write-file-atomic": "^4.0.2" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/types": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz", - "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/schemas": "^29.6.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.8", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz", - "integrity": "sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/set-array": "^1.2.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.24" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", - "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/set-array": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", - "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", - "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.25", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", - "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" - } - }, - "node_modules/@octokit/auth-token": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-3.0.4.tgz", - "integrity": "sha512-TWFX7cZF2LXoCvdmJWY7XVPi74aSY0+FfBZNSXEXFkMpjcqsQwDSYVv5FhRFaI0V1ECnwbz4j59T/G+rXNWaIQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 14" - } - }, - "node_modules/@octokit/core": { - "version": "4.2.4", - "resolved": "https://registry.npmjs.org/@octokit/core/-/core-4.2.4.tgz", - "integrity": "sha512-rYKilwgzQ7/imScn3M9/pFfUf4I1AZEH3KhyJmtPdE2zfaXAn2mFfUy4FbKewzc2We5y/LlKLj36fWJLKC2SIQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@octokit/auth-token": "^3.0.0", - "@octokit/graphql": "^5.0.0", - "@octokit/request": "^6.0.0", - "@octokit/request-error": "^3.0.0", - "@octokit/types": "^9.0.0", - "before-after-hook": "^2.2.0", - "universal-user-agent": "^6.0.0" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/@octokit/endpoint": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-7.0.6.tgz", - "integrity": "sha512-5L4fseVRUsDFGR00tMWD/Trdeeihn999rTMGRMC1G/Ldi1uWlWJzI98H4Iak5DB/RVvQuyMYKqSK/R6mbSOQyg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@octokit/types": "^9.0.0", - "is-plain-object": "^5.0.0", - "universal-user-agent": "^6.0.0" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/@octokit/graphql": { - "version": "5.0.6", - "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-5.0.6.tgz", - "integrity": "sha512-Fxyxdy/JH0MnIB5h+UQ3yCoh1FG4kWXfFKkpWqjZHw/p+Kc8Y44Hu/kCgNBT6nU1shNumEchmW/sUO1JuQnPcw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@octokit/request": "^6.0.0", - "@octokit/types": "^9.0.0", - "universal-user-agent": "^6.0.0" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/@octokit/openapi-types": { - "version": "18.1.1", - "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-18.1.1.tgz", - "integrity": "sha512-VRaeH8nCDtF5aXWnjPuEMIYf1itK/s3JYyJcWFJT8X9pSNnBtriDf7wlEWsGuhPLl4QIH4xM8fqTXDwJ3Mu6sw==", - "dev": true, - "license": "MIT" - }, - "node_modules/@octokit/plugin-paginate-rest": { - "version": "6.1.2", - "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-6.1.2.tgz", - "integrity": "sha512-qhrmtQeHU/IivxucOV1bbI/xZyC/iOBhclokv7Sut5vnejAIAEXVcGQeRpQlU39E0WwK9lNvJHphHri/DB6lbQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@octokit/tsconfig": "^1.0.2", - "@octokit/types": "^9.2.3" - }, - "engines": { - "node": ">= 14" - }, - "peerDependencies": { - "@octokit/core": ">=4" - } - }, - "node_modules/@octokit/plugin-request-log": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@octokit/plugin-request-log/-/plugin-request-log-1.0.4.tgz", - "integrity": "sha512-mLUsMkgP7K/cnFEw07kWqXGF5LKrOkD+lhCrKvPHXWDywAwuDUeDwWBpc69XK3pNX0uKiVt8g5z96PJ6z9xCFA==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "@octokit/core": ">=3" - } - }, - "node_modules/@octokit/plugin-rest-endpoint-methods": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-7.2.3.tgz", - "integrity": "sha512-I5Gml6kTAkzVlN7KCtjOM+Ruwe/rQppp0QU372K1GP7kNOYEKe8Xn5BW4sE62JAHdwpq95OQK/qGNyKQMUzVgA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@octokit/types": "^10.0.0" - }, - "engines": { - "node": ">= 14" - }, - "peerDependencies": { - "@octokit/core": ">=3" - } - }, - "node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/@octokit/types/-/types-10.0.0.tgz", - "integrity": "sha512-Vm8IddVmhCgU1fxC1eyinpwqzXPEYu0NrYzD3YZjlGjyftdLBTeqNblRC0jmJmgxbJIsQlyogVeGnrNaaMVzIg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@octokit/openapi-types": "^18.0.0" - } - }, - "node_modules/@octokit/request": { - "version": "6.2.8", - "resolved": "https://registry.npmjs.org/@octokit/request/-/request-6.2.8.tgz", - "integrity": "sha512-ow4+pkVQ+6XVVsekSYBzJC0VTVvh/FCTUUgTsboGq+DTeWdyIFV8WSCdo0RIxk6wSkBTHqIK1mYuY7nOBXOchw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@octokit/endpoint": "^7.0.0", - "@octokit/request-error": "^3.0.0", - "@octokit/types": "^9.0.0", - "is-plain-object": "^5.0.0", - "node-fetch": "^2.6.7", - "universal-user-agent": "^6.0.0" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/@octokit/request-error": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-3.0.3.tgz", - "integrity": "sha512-crqw3V5Iy2uOU5Np+8M/YexTlT8zxCfI+qu+LxUB7SZpje4Qmx3mub5DfEKSO8Ylyk0aogi6TYdf6kxzh2BguQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@octokit/types": "^9.0.0", - "deprecation": "^2.0.0", - "once": "^1.4.0" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/@octokit/rest": { - "version": "19.0.13", - "resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-19.0.13.tgz", - "integrity": "sha512-/EzVox5V9gYGdbAI+ovYj3nXQT1TtTHRT+0eZPcuC05UFSWO3mdO9UY1C0i2eLF9Un1ONJkAk+IEtYGAC+TahA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@octokit/core": "^4.2.1", - "@octokit/plugin-paginate-rest": "^6.1.2", - "@octokit/plugin-request-log": "^1.0.4", - "@octokit/plugin-rest-endpoint-methods": "^7.1.2" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/@octokit/tsconfig": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@octokit/tsconfig/-/tsconfig-1.0.2.tgz", - "integrity": "sha512-I0vDR0rdtP8p2lGMzvsJzbhdOWy405HcGovrspJ8RRibHnyRgggUSNO5AIox5LmqiwmatHKYsvj6VGFHkqS7lA==", - "dev": true, - "license": "MIT" - }, - "node_modules/@octokit/types": { - "version": "9.3.2", - "resolved": "https://registry.npmjs.org/@octokit/types/-/types-9.3.2.tgz", - "integrity": "sha512-D4iHGTdAnEEVsB8fl95m1hiz7D5YiRdQ9b/OEb3BYRVwbLsGHcRVPz+u+BgRLNk0Q0/4iZCBqDN96j2XNxfXrA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@octokit/openapi-types": "^18.0.0" - } - }, - "node_modules/@rollup/plugin-commonjs": { - "version": "25.0.8", - "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-25.0.8.tgz", - "integrity": "sha512-ZEZWTK5n6Qde0to4vS9Mr5x/0UZoqCxPVR9KRUjU4kA2sO7GEUn1fop0DAwpO6z0Nw/kJON9bDmSxdWxO/TT1A==", - "dev": true, - "license": "MIT", - "dependencies": { - "@rollup/pluginutils": "^5.0.1", - "commondir": "^1.0.1", - "estree-walker": "^2.0.2", - "glob": "^8.0.3", - "is-reference": "1.2.1", - "magic-string": "^0.30.3" - }, - "engines": { - "node": ">=14.0.0" - }, - "peerDependencies": { - "rollup": "^2.68.0||^3.0.0||^4.0.0" - }, - "peerDependenciesMeta": { - "rollup": { - "optional": true - } - } - }, - "node_modules/@rollup/plugin-node-resolve": { - "version": "15.3.1", - "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-15.3.1.tgz", - "integrity": "sha512-tgg6b91pAybXHJQMAAwW9VuWBO6Thi+q7BCNARLwSqlmsHz0XYURtGvh/AuwSADXSI4h/2uHbs7s4FzlZDGSGA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@rollup/pluginutils": "^5.0.1", - "@types/resolve": "1.20.2", - "deepmerge": "^4.2.2", - "is-module": "^1.0.0", - "resolve": "^1.22.1" - }, - "engines": { - "node": ">=14.0.0" - }, - "peerDependencies": { - "rollup": "^2.78.0||^3.0.0||^4.0.0" - }, - "peerDependenciesMeta": { - "rollup": { - "optional": true - } - } - }, - "node_modules/@rollup/pluginutils": { - "version": "5.1.4", - "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.1.4.tgz", - "integrity": "sha512-USm05zrsFxYLPdWWq+K3STlWiT/3ELn3RcV5hJMghpeAIhxfsUIg6mt12CBJBInWMV4VneoV7SfGv8xIwo2qNQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/estree": "^1.0.0", - "estree-walker": "^2.0.2", - "picomatch": "^4.0.2" - }, - "engines": { - "node": ">=14.0.0" - }, - "peerDependencies": { - "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" - }, - "peerDependenciesMeta": { - "rollup": { - "optional": true - } - } - }, - "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.34.6", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.34.6.tgz", - "integrity": "sha512-+GcCXtOQoWuC7hhX1P00LqjjIiS/iOouHXhMdiDSnq/1DGTox4SpUvO52Xm+div6+106r+TcvOeo/cxvyEyTgg==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "peer": true - }, - "node_modules/@rollup/rollup-android-arm64": { - "version": "4.34.6", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.34.6.tgz", - "integrity": "sha512-E8+2qCIjciYUnCa1AiVF1BkRgqIGW9KzJeesQqVfyRITGQN+dFuoivO0hnro1DjT74wXLRZ7QF8MIbz+luGaJA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "peer": true - }, - "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.34.6", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.34.6.tgz", - "integrity": "sha512-z9Ib+OzqN3DZEjX7PDQMHEhtF+t6Mi2z/ueChQPLS/qUMKY7Ybn5A2ggFoKRNRh1q1T03YTQfBTQCJZiepESAg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "peer": true - }, - "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.34.6", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.34.6.tgz", - "integrity": "sha512-PShKVY4u0FDAR7jskyFIYVyHEPCPnIQY8s5OcXkdU8mz3Y7eXDJPdyM/ZWjkYdR2m0izD9HHWA8sGcXn+Qrsyg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "peer": true - }, - "node_modules/@rollup/rollup-freebsd-arm64": { - "version": "4.34.6", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.34.6.tgz", - "integrity": "sha512-YSwyOqlDAdKqs0iKuqvRHLN4SrD2TiswfoLfvYXseKbL47ht1grQpq46MSiQAx6rQEN8o8URtpXARCpqabqxGQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "peer": true - }, - "node_modules/@rollup/rollup-freebsd-x64": { - "version": "4.34.6", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.34.6.tgz", - "integrity": "sha512-HEP4CgPAY1RxXwwL5sPFv6BBM3tVeLnshF03HMhJYCNc6kvSqBgTMmsEjb72RkZBAWIqiPUyF1JpEBv5XT9wKQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "peer": true - }, - "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.34.6", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.34.6.tgz", - "integrity": "sha512-88fSzjC5xeH9S2Vg3rPgXJULkHcLYMkh8faix8DX4h4TIAL65ekwuQMA/g2CXq8W+NJC43V6fUpYZNjaX3+IIg==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "peer": true - }, - "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.34.6", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.34.6.tgz", - "integrity": "sha512-wM4ztnutBqYFyvNeR7Av+reWI/enK9tDOTKNF+6Kk2Q96k9bwhDDOlnCUNRPvromlVXo04riSliMBs/Z7RteEg==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "peer": true - }, - "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.34.6", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.34.6.tgz", - "integrity": "sha512-9RyprECbRa9zEjXLtvvshhw4CMrRa3K+0wcp3KME0zmBe1ILmvcVHnypZ/aIDXpRyfhSYSuN4EPdCCj5Du8FIA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "peer": true - }, - "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.34.6", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.34.6.tgz", - "integrity": "sha512-qTmklhCTyaJSB05S+iSovfo++EwnIEZxHkzv5dep4qoszUMX5Ca4WM4zAVUMbfdviLgCSQOu5oU8YoGk1s6M9Q==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "peer": true - }, - "node_modules/@rollup/rollup-linux-loongarch64-gnu": { - "version": "4.34.6", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.34.6.tgz", - "integrity": "sha512-4Qmkaps9yqmpjY5pvpkfOerYgKNUGzQpFxV6rnS7c/JfYbDSU0y6WpbbredB5cCpLFGJEqYX40WUmxMkwhWCjw==", - "cpu": [ - "loong64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "peer": true - }, - "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.34.6", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.34.6.tgz", - "integrity": "sha512-Zsrtux3PuaxuBTX/zHdLaFmcofWGzaWW1scwLU3ZbW/X+hSsFbz9wDIp6XvnT7pzYRl9MezWqEqKy7ssmDEnuQ==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "peer": true - }, - "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.34.6", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.34.6.tgz", - "integrity": "sha512-aK+Zp+CRM55iPrlyKiU3/zyhgzWBxLVrw2mwiQSYJRobCURb781+XstzvA8Gkjg/hbdQFuDw44aUOxVQFycrAg==", - "cpu": [ - "riscv64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "peer": true - }, - "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.34.6", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.34.6.tgz", - "integrity": "sha512-WoKLVrY9ogmaYPXwTH326+ErlCIgMmsoRSx6bO+l68YgJnlOXhygDYSZe/qbUJCSiCiZAQ+tKm88NcWuUXqOzw==", - "cpu": [ - "s390x" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "peer": true - }, - "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.34.6", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.34.6.tgz", - "integrity": "sha512-Sht4aFvmA4ToHd2vFzwMFaQCiYm2lDFho5rPcvPBT5pCdC+GwHG6CMch4GQfmWTQ1SwRKS0dhDYb54khSrjDWw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "peer": true - }, - "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.34.6", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.34.6.tgz", - "integrity": "sha512-zmmpOQh8vXc2QITsnCiODCDGXFC8LMi64+/oPpPx5qz3pqv0s6x46ps4xoycfUiVZps5PFn1gksZzo4RGTKT+A==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "peer": true - }, - "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.34.6", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.34.6.tgz", - "integrity": "sha512-3/q1qUsO/tLqGBaD4uXsB6coVGB3usxw3qyeVb59aArCgedSF66MPdgRStUd7vbZOsko/CgVaY5fo2vkvPLWiA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "peer": true - }, - "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.34.6", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.34.6.tgz", - "integrity": "sha512-oLHxuyywc6efdKVTxvc0135zPrRdtYVjtVD5GUm55I3ODxhU/PwkQFD97z16Xzxa1Fz0AEe4W/2hzRtd+IfpOA==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "peer": true - }, - "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.34.6", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.34.6.tgz", - "integrity": "sha512-0PVwmgzZ8+TZ9oGBmdZoQVXflbvuwzN/HRclujpl4N/q3i+y0lqLw8n1bXA8ru3sApDjlmONaNAuYr38y1Kr9w==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "peer": true - }, - "node_modules/@sinclair/typebox": { - "version": "0.27.8", - "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", - "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", - "dev": true, - "license": "MIT" - }, - "node_modules/@sinonjs/commons": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz", - "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "type-detect": "4.0.8" - } - }, - "node_modules/@sinonjs/fake-timers": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz", - "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@sinonjs/commons": "^3.0.0" - } - }, - "node_modules/@types/babel__core": { - "version": "7.20.5", - "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", - "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/parser": "^7.20.7", - "@babel/types": "^7.20.7", - "@types/babel__generator": "*", - "@types/babel__template": "*", - "@types/babel__traverse": "*" - } - }, - "node_modules/@types/babel__generator": { - "version": "7.6.8", - "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.8.tgz", - "integrity": "sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.0.0" - } - }, - "node_modules/@types/babel__template": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", - "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/parser": "^7.1.0", - "@babel/types": "^7.0.0" - } - }, - "node_modules/@types/babel__traverse": { - "version": "7.20.6", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.6.tgz", - "integrity": "sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.20.7" - } - }, - "node_modules/@types/estree": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", - "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/gensync": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@types/gensync/-/gensync-1.0.4.tgz", - "integrity": "sha512-C3YYeRQWp2fmq9OryX+FoDy8nXS6scQ7dPptD8LnFDAUNcKWJjXQKDNJD3HVm+kOUsXhTOkpi69vI4EuAr95bA==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/graceful-fs": { - "version": "4.1.9", - "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz", - "integrity": "sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/istanbul-lib-coverage": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", - "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/istanbul-lib-report": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz", - "integrity": "sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/istanbul-lib-coverage": "*" - } - }, - "node_modules/@types/istanbul-reports": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz", - "integrity": "sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/istanbul-lib-report": "*" - } - }, - "node_modules/@types/jest": { - "version": "29.5.14", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.14.tgz", - "integrity": "sha512-ZN+4sdnLUbo8EVvVc2ao0GFW6oVrQRPn4K2lglySj7APvSrgzxHiNNK99us4WDMi57xxA2yggblIAMNhXOotLQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "expect": "^29.0.0", - "pretty-format": "^29.0.0" - } - }, - "node_modules/@types/node": { - "version": "22.13.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.13.2.tgz", - "integrity": "sha512-Z+r8y3XL9ZpI2EY52YYygAFmo2/oWfNSj4BCpAXE2McAexDk8VcnBMGC9Djn9gTKt4d2T/hhXqmPzo4hfIXtTg==", - "dev": true, - "license": "MIT", - "dependencies": { - "undici-types": "~6.20.0" - } - }, - "node_modules/@types/resolve": { - "version": "1.20.2", - "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.20.2.tgz", - "integrity": "sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/stack-utils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz", - "integrity": "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/yargs": { - "version": "17.0.33", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.33.tgz", - "integrity": "sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/yargs-parser": "*" - } - }, - "node_modules/@types/yargs-parser": { - "version": "21.0.3", - "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.3.tgz", - "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/ansi-escapes": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", - "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "type-fest": "^0.21.3" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/ansi-sequence-parser": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/ansi-sequence-parser/-/ansi-sequence-parser-1.1.3.tgz", - "integrity": "sha512-+fksAx9eG3Ab6LDnLs3ZqZa8KVJ/jYnX+D4Qe1azX+LFGFAXqynCQLOdLpNYN/l9e7l6hMWwZbrnctqr6eSQSw==", - "dev": true, - "license": "MIT" - }, - "node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/anymatch": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", - "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", - "dev": true, - "license": "ISC", - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/anymatch/node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "license": "MIT", - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, - "node_modules/async": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz", - "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==", - "dev": true, - "license": "MIT" - }, - "node_modules/babel-jest": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz", - "integrity": "sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/transform": "^29.7.0", - "@types/babel__core": "^7.1.14", - "babel-plugin-istanbul": "^6.1.1", - "babel-preset-jest": "^29.6.3", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "slash": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "@babel/core": "^7.8.0" - } - }, - "node_modules/babel-plugin-istanbul": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", - "integrity": "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@babel/helper-plugin-utils": "^7.0.0", - "@istanbuljs/load-nyc-config": "^1.0.0", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-instrument": "^5.0.4", - "test-exclude": "^6.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/babel-plugin-istanbul/node_modules/istanbul-lib-instrument": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz", - "integrity": "sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@babel/core": "^7.12.3", - "@babel/parser": "^7.14.7", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-coverage": "^3.2.0", - "semver": "^6.3.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/babel-plugin-istanbul/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/babel-plugin-jest-hoist": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz", - "integrity": "sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/template": "^7.3.3", - "@babel/types": "^7.3.3", - "@types/babel__core": "^7.1.14", - "@types/babel__traverse": "^7.0.6" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/babel-preset-current-node-syntax": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.1.0.tgz", - "integrity": "sha512-ldYss8SbBlWva1bs28q78Ju5Zq1F+8BrqBZZ0VFhLBvhh6lCpC2o3gDJi/5DRLs9FgYZCnmPYIVFU4lRXCkyUw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/plugin-syntax-async-generators": "^7.8.4", - "@babel/plugin-syntax-bigint": "^7.8.3", - "@babel/plugin-syntax-class-properties": "^7.12.13", - "@babel/plugin-syntax-class-static-block": "^7.14.5", - "@babel/plugin-syntax-import-attributes": "^7.24.7", - "@babel/plugin-syntax-import-meta": "^7.10.4", - "@babel/plugin-syntax-json-strings": "^7.8.3", - "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", - "@babel/plugin-syntax-numeric-separator": "^7.10.4", - "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", - "@babel/plugin-syntax-optional-chaining": "^7.8.3", - "@babel/plugin-syntax-private-property-in-object": "^7.14.5", - "@babel/plugin-syntax-top-level-await": "^7.14.5" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/babel-preset-jest": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz", - "integrity": "sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA==", - "dev": true, - "license": "MIT", - "dependencies": { - "babel-plugin-jest-hoist": "^29.6.3", - "babel-preset-current-node-syntax": "^1.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true, - "license": "MIT" - }, - "node_modules/before-after-hook": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.3.tgz", - "integrity": "sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ==", - "dev": true, - "license": "Apache-2.0" - }, - "node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/braces": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", - "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", - "dev": true, - "license": "MIT", - "dependencies": { - "fill-range": "^7.1.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/browserslist": { - "version": "4.24.4", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.4.tgz", - "integrity": "sha512-KDi1Ny1gSePi1vm0q4oxSF8b4DR44GF4BbmS2YdhPLOEqd8pDviZOGH/GsmRwoWJ2+5Lr085X7naowMwKHDG1A==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "caniuse-lite": "^1.0.30001688", - "electron-to-chromium": "^1.5.73", - "node-releases": "^2.0.19", - "update-browserslist-db": "^1.1.1" - }, - "bin": { - "browserslist": "cli.js" - }, - "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" - } - }, - "node_modules/bs-logger": { - "version": "0.2.6", - "resolved": "https://registry.npmjs.org/bs-logger/-/bs-logger-0.2.6.tgz", - "integrity": "sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-json-stable-stringify": "2.x" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/bser": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", - "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "node-int64": "^0.4.0" - } - }, - "node_modules/buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/caniuse-lite": { - "version": "1.0.30001699", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001699.tgz", - "integrity": "sha512-b+uH5BakXZ9Do9iK+CkDmctUSEqZl+SP056vc5usa0PL+ev5OHw003rZXcnjNDv3L8P5j6rwT6C0BPKSikW08w==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/caniuse-lite" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "CC-BY-4.0" - }, - "node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/char-regex": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", - "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - } - }, - "node_modules/ci-info": { - "version": "3.9.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", - "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/sibiraj-s" - } - ], - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/cjs-module-lexer": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.4.3.tgz", - "integrity": "sha512-9z8TZaGM1pfswYeXrUpzPrkx8UnWYdhJclsiYMm6x/w5+nN+8Tf/LnAgfLGQCm59qAOxU8WwHEq2vNwF6i4j+Q==", - "dev": true, - "license": "MIT" - }, - "node_modules/cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "dev": true, - "license": "ISC", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/co": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", - "dev": true, - "license": "MIT", - "engines": { - "iojs": ">= 1.0.0", - "node": ">= 0.12.0" - } - }, - "node_modules/collect-v8-coverage": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz", - "integrity": "sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==", - "dev": true, - "license": "MIT" - }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true, - "license": "MIT" - }, - "node_modules/commondir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==", - "dev": true, - "license": "MIT" - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true, - "license": "MIT" - }, - "node_modules/convert-source-map": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", - "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", - "dev": true, - "license": "MIT" - }, - "node_modules/create-jest": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/create-jest/-/create-jest-29.7.0.tgz", - "integrity": "sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^29.6.3", - "chalk": "^4.0.0", - "exit": "^0.1.2", - "graceful-fs": "^4.2.9", - "jest-config": "^29.7.0", - "jest-util": "^29.7.0", - "prompts": "^2.0.1" - }, - "bin": { - "create-jest": "bin/create-jest.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/cross-spawn": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", - "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", - "dev": true, - "license": "MIT", - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/debug": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", - "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "^2.1.3" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/dedent": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.5.3.tgz", - "integrity": "sha512-NHQtfOOW68WD8lgypbLA5oT+Bt0xXJhiYvoR6SmmNXZfpzOGXwdKWmcwG8N7PwVVWV3eF/68nmD9BaJSsTBhyQ==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "babel-plugin-macros": "^3.1.0" - }, - "peerDependenciesMeta": { - "babel-plugin-macros": { - "optional": true - } - } - }, - "node_modules/deepmerge": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", - "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/deprecation": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz", - "integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==", - "dev": true, - "license": "ISC" - }, - "node_modules/detect-newline": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", - "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/diff-sequences": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", - "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/ejs": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.10.tgz", - "integrity": "sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "jake": "^10.8.5" - }, - "bin": { - "ejs": "bin/cli.js" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/electron-to-chromium": { - "version": "1.5.99", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.99.tgz", - "integrity": "sha512-77c/+fCyL2U+aOyqfIFi89wYLBeSTCs55xCZL0oFH0KjqsvSvyh6AdQ+UIl1vgpnQQE6g+/KK8hOIupH6VwPtg==", - "dev": true, - "license": "ISC" - }, - "node_modules/emittery": { - "version": "0.13.1", - "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz", - "integrity": "sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sindresorhus/emittery?sponsor=1" - } - }, - "node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true, - "license": "MIT" - }, - "node_modules/error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-arrayish": "^0.2.1" - } - }, - "node_modules/escalade": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", - "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/escape-string-regexp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", - "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true, - "license": "BSD-2-Clause", - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/estree-walker": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", - "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", - "dev": true, - "license": "MIT" - }, - "node_modules/execa": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", - "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", - "dev": true, - "license": "MIT", - "dependencies": { - "cross-spawn": "^7.0.3", - "get-stream": "^6.0.0", - "human-signals": "^2.1.0", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.1", - "onetime": "^5.1.2", - "signal-exit": "^3.0.3", - "strip-final-newline": "^2.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sindresorhus/execa?sponsor=1" - } - }, - "node_modules/exit": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", - "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", - "dev": true, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/expect": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/expect/-/expect-29.7.0.tgz", - "integrity": "sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/expect-utils": "^29.7.0", - "jest-get-type": "^29.6.3", - "jest-matcher-utils": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-util": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/extra-build": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/extra-build/-/extra-build-2.3.0.tgz", - "integrity": "sha512-9mm2BpkyIYr1EpsMSvfv2rhIt/xZR2DX2RuS8wWwm2ILrZUbF6dTq8Mw+eIndNDmG1cDLztu+H6ZoiUel6LY/g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@octokit/rest": "^19.0.13", - "extra-javascript-text": "^0.1.14", - "extra-jsdoc-text": "^0.1.20", - "extra-markdown-text": "^0.1.5", - "extra-typedoc-theme": "^0.1.16", - "kleur": "^4.1.5", - "semver": "^7.6.3", - "typedoc": "^0.24.8" - } - }, - "node_modules/extra-function": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/extra-function/-/extra-function-1.3.1.tgz", - "integrity": "sha512-RUuh6v2DAaH2eCk3TNOL6PLPn4pUBOTkpet3J1KmS/79r32o3Ic8AIEF1QSAr1qzu2YzE0agme0zeiL8zN/+xA==", - "dev": true, - "license": "MIT" - }, - "node_modules/extra-javascript-text": { - "version": "0.1.14", - "resolved": "https://registry.npmjs.org/extra-javascript-text/-/extra-javascript-text-0.1.14.tgz", - "integrity": "sha512-TNgv0bOqof+zzIjhr7jO39R4rZRMEtXIqDLKrp+oh1jmBKvsi9w5zfu3HIjAox5W9UGF8QOYIgiHNGWFpRqEOw==", - "dev": true, - "license": "MIT" - }, - "node_modules/extra-jsdoc-text": { - "version": "0.1.20", - "resolved": "https://registry.npmjs.org/extra-jsdoc-text/-/extra-jsdoc-text-0.1.20.tgz", - "integrity": "sha512-tsL8F68GE7heoSwixUH1Nc3p2rl4cfCV5sDKWpaWw+N6aUnyQ5q2i2omM45rseKQqJgp4fqg5LmR7cbStxef/A==", - "dev": true, - "license": "BSD-3-Clause" - }, - "node_modules/extra-markdown-text": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/extra-markdown-text/-/extra-markdown-text-0.1.5.tgz", - "integrity": "sha512-yrdMZcpSnVItpqfKT3isugaebAcs2QUNdLOZkTUf6zNyqEip9ewdnbSI/uQ2+n725cItFGCMDqoWgShg19tcQw==", - "dev": true, - "license": "BSD-3-Clause" - }, - "node_modules/extra-math": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/extra-math/-/extra-math-1.5.0.tgz", - "integrity": "sha512-CqFkrzGCaYn9A3AotTJsEe/0+PsA5oqzkDry6GN9wD5a77A4nmUuO8vKVy+6PdysRNDFh73oLR+QOtAbP59XpQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/extra-typedoc-theme": { - "version": "0.1.16", - "resolved": "https://registry.npmjs.org/extra-typedoc-theme/-/extra-typedoc-theme-0.1.16.tgz", - "integrity": "sha512-l33DH5jj1ioVBy1TBSG1WLBAH+JpfW7NcNAVQ65uMBHX7zgJQ4leKRGCmaC5o4EkbWlDFE28+QiQsNxyQ+6CBQ==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "typedoc": "^0.24.8" - } - }, - "node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true, - "license": "MIT" - }, - "node_modules/fb-watchman": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz", - "integrity": "sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "bser": "2.1.1" - } - }, - "node_modules/filelist": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.4.tgz", - "integrity": "sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "minimatch": "^5.0.1" - } - }, - "node_modules/fill-range": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", - "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", - "dev": true, - "license": "MIT", - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true, - "license": "ISC" - }, - "node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/function-bind": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", - "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/gensync": { - "version": "1.0.0-beta.2", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", - "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true, - "license": "ISC", - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, - "node_modules/get-package-type": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", - "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/get-stream": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/glob": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", - "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", - "deprecated": "Glob versions prior to v9 are no longer supported", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^5.0.1", - "once": "^1.3.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/graceful-fs": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "dev": true, - "license": "ISC" - }, - "node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/hasown": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", - "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/html-escaper": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", - "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", - "dev": true, - "license": "MIT" - }, - "node_modules/human-signals": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", - "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=10.17.0" - } - }, - "node_modules/import-local": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.2.0.tgz", - "integrity": "sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA==", - "dev": true, - "license": "MIT", - "dependencies": { - "pkg-dir": "^4.2.0", - "resolve-cwd": "^3.0.0" - }, - "bin": { - "import-local-fixture": "fixtures/cli.js" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.19" - } - }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", - "dev": true, - "license": "ISC", - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true, - "license": "ISC" - }, - "node_modules/is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", - "dev": true, - "license": "MIT" - }, - "node_modules/is-core-module": { - "version": "2.16.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz", - "integrity": "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==", - "dev": true, - "license": "MIT", - "dependencies": { - "hasown": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/is-generator-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz", - "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/is-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", - "integrity": "sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==", - "dev": true, - "license": "MIT" - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/is-plain-object": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", - "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-reference": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.2.1.tgz", - "integrity": "sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/estree": "*" - } - }, - "node_modules/is-stream": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", - "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true, - "license": "ISC" - }, - "node_modules/istanbul-lib-coverage": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", - "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-instrument": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.3.tgz", - "integrity": "sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@babel/core": "^7.23.9", - "@babel/parser": "^7.23.9", - "@istanbuljs/schema": "^0.1.3", - "istanbul-lib-coverage": "^3.2.0", - "semver": "^7.5.4" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/istanbul-lib-report": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", - "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^4.0.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/istanbul-lib-source-maps": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", - "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "debug": "^4.1.1", - "istanbul-lib-coverage": "^3.0.0", - "source-map": "^0.6.1" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/istanbul-reports": { - "version": "3.1.7", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz", - "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "html-escaper": "^2.0.0", - "istanbul-lib-report": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jake": { - "version": "10.9.2", - "resolved": "https://registry.npmjs.org/jake/-/jake-10.9.2.tgz", - "integrity": "sha512-2P4SQ0HrLQ+fw6llpLnOaGAvN2Zu6778SJMrCUwns4fOoG9ayrTiZk3VV8sCPkVZF8ab0zksVpS8FDY5pRCNBA==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "async": "^3.2.3", - "chalk": "^4.0.2", - "filelist": "^1.0.4", - "minimatch": "^3.1.2" - }, - "bin": { - "jake": "bin/cli.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/jake/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/jake/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/jest": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz", - "integrity": "sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/core": "^29.7.0", - "@jest/types": "^29.6.3", - "import-local": "^3.0.2", - "jest-cli": "^29.7.0" - }, - "bin": { - "jest": "bin/jest.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "node_modules/jest-changed-files": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.7.0.tgz", - "integrity": "sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w==", - "dev": true, - "license": "MIT", - "dependencies": { - "execa": "^5.0.0", - "jest-util": "^29.7.0", - "p-limit": "^3.1.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-circus": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.7.0.tgz", - "integrity": "sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/environment": "^29.7.0", - "@jest/expect": "^29.7.0", - "@jest/test-result": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "chalk": "^4.0.0", - "co": "^4.6.0", - "dedent": "^1.0.0", - "is-generator-fn": "^2.0.0", - "jest-each": "^29.7.0", - "jest-matcher-utils": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-runtime": "^29.7.0", - "jest-snapshot": "^29.7.0", - "jest-util": "^29.7.0", - "p-limit": "^3.1.0", - "pretty-format": "^29.7.0", - "pure-rand": "^6.0.0", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-cli": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.7.0.tgz", - "integrity": "sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/core": "^29.7.0", - "@jest/test-result": "^29.7.0", - "@jest/types": "^29.6.3", - "chalk": "^4.0.0", - "create-jest": "^29.7.0", - "exit": "^0.1.2", - "import-local": "^3.0.2", - "jest-config": "^29.7.0", - "jest-util": "^29.7.0", - "jest-validate": "^29.7.0", - "yargs": "^17.3.1" - }, - "bin": { - "jest": "bin/jest.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "node_modules/jest-config": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.7.0.tgz", - "integrity": "sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/core": "^7.11.6", - "@jest/test-sequencer": "^29.7.0", - "@jest/types": "^29.6.3", - "babel-jest": "^29.7.0", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "deepmerge": "^4.2.2", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "jest-circus": "^29.7.0", - "jest-environment-node": "^29.7.0", - "jest-get-type": "^29.6.3", - "jest-regex-util": "^29.6.3", - "jest-resolve": "^29.7.0", - "jest-runner": "^29.7.0", - "jest-util": "^29.7.0", - "jest-validate": "^29.7.0", - "micromatch": "^4.0.4", - "parse-json": "^5.2.0", - "pretty-format": "^29.7.0", - "slash": "^3.0.0", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "@types/node": "*", - "ts-node": ">=9.0.0" - }, - "peerDependenciesMeta": { - "@types/node": { - "optional": true - }, - "ts-node": { - "optional": true - } - } - }, - "node_modules/jest-config/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/jest-config/node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/jest-config/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/jest-diff": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz", - "integrity": "sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^4.0.0", - "diff-sequences": "^29.6.3", - "jest-get-type": "^29.6.3", - "pretty-format": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-docblock": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.7.0.tgz", - "integrity": "sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g==", - "dev": true, - "license": "MIT", - "dependencies": { - "detect-newline": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-each": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.7.0.tgz", - "integrity": "sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^29.6.3", - "chalk": "^4.0.0", - "jest-get-type": "^29.6.3", - "jest-util": "^29.7.0", - "pretty-format": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-environment-node": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.7.0.tgz", - "integrity": "sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/environment": "^29.7.0", - "@jest/fake-timers": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "jest-mock": "^29.7.0", - "jest-util": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-get-type": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.6.3.tgz", - "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-haste-map": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.7.0.tgz", - "integrity": "sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^29.6.3", - "@types/graceful-fs": "^4.1.3", - "@types/node": "*", - "anymatch": "^3.0.3", - "fb-watchman": "^2.0.0", - "graceful-fs": "^4.2.9", - "jest-regex-util": "^29.6.3", - "jest-util": "^29.7.0", - "jest-worker": "^29.7.0", - "micromatch": "^4.0.4", - "walker": "^1.0.8" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "optionalDependencies": { - "fsevents": "^2.3.2" - } - }, - "node_modules/jest-leak-detector": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz", - "integrity": "sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw==", - "dev": true, - "license": "MIT", - "dependencies": { - "jest-get-type": "^29.6.3", - "pretty-format": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-matcher-utils": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz", - "integrity": "sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^4.0.0", - "jest-diff": "^29.7.0", - "jest-get-type": "^29.6.3", - "pretty-format": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-message-util": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.7.0.tgz", - "integrity": "sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.12.13", - "@jest/types": "^29.6.3", - "@types/stack-utils": "^2.0.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "micromatch": "^4.0.4", - "pretty-format": "^29.7.0", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-mock": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.7.0.tgz", - "integrity": "sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^29.6.3", - "@types/node": "*", - "jest-util": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-pnp-resolver": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", - "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - }, - "peerDependencies": { - "jest-resolve": "*" - }, - "peerDependenciesMeta": { - "jest-resolve": { - "optional": true - } - } - }, - "node_modules/jest-regex-util": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.6.3.tgz", - "integrity": "sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-resolve": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.7.0.tgz", - "integrity": "sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA==", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.7.0", - "jest-pnp-resolver": "^1.2.2", - "jest-util": "^29.7.0", - "jest-validate": "^29.7.0", - "resolve": "^1.20.0", - "resolve.exports": "^2.0.0", - "slash": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-resolve-dependencies": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz", - "integrity": "sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA==", - "dev": true, - "license": "MIT", - "dependencies": { - "jest-regex-util": "^29.6.3", - "jest-snapshot": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-runner": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.7.0.tgz", - "integrity": "sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/console": "^29.7.0", - "@jest/environment": "^29.7.0", - "@jest/test-result": "^29.7.0", - "@jest/transform": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "chalk": "^4.0.0", - "emittery": "^0.13.1", - "graceful-fs": "^4.2.9", - "jest-docblock": "^29.7.0", - "jest-environment-node": "^29.7.0", - "jest-haste-map": "^29.7.0", - "jest-leak-detector": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-resolve": "^29.7.0", - "jest-runtime": "^29.7.0", - "jest-util": "^29.7.0", - "jest-watcher": "^29.7.0", - "jest-worker": "^29.7.0", - "p-limit": "^3.1.0", - "source-map-support": "0.5.13" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-runtime": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.7.0.tgz", - "integrity": "sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/environment": "^29.7.0", - "@jest/fake-timers": "^29.7.0", - "@jest/globals": "^29.7.0", - "@jest/source-map": "^29.6.3", - "@jest/test-result": "^29.7.0", - "@jest/transform": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "chalk": "^4.0.0", - "cjs-module-lexer": "^1.0.0", - "collect-v8-coverage": "^1.0.0", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-mock": "^29.7.0", - "jest-regex-util": "^29.6.3", - "jest-resolve": "^29.7.0", - "jest-snapshot": "^29.7.0", - "jest-util": "^29.7.0", - "slash": "^3.0.0", - "strip-bom": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-runtime/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/jest-runtime/node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/jest-runtime/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/jest-snapshot": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.7.0.tgz", - "integrity": "sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/core": "^7.11.6", - "@babel/generator": "^7.7.2", - "@babel/plugin-syntax-jsx": "^7.7.2", - "@babel/plugin-syntax-typescript": "^7.7.2", - "@babel/types": "^7.3.3", - "@jest/expect-utils": "^29.7.0", - "@jest/transform": "^29.7.0", - "@jest/types": "^29.6.3", - "babel-preset-current-node-syntax": "^1.0.0", - "chalk": "^4.0.0", - "expect": "^29.7.0", - "graceful-fs": "^4.2.9", - "jest-diff": "^29.7.0", - "jest-get-type": "^29.6.3", - "jest-matcher-utils": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-util": "^29.7.0", - "natural-compare": "^1.4.0", - "pretty-format": "^29.7.0", - "semver": "^7.5.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-util": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz", - "integrity": "sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^29.6.3", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-util/node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/jest-validate": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.7.0.tgz", - "integrity": "sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^29.6.3", - "camelcase": "^6.2.0", - "chalk": "^4.0.0", - "jest-get-type": "^29.6.3", - "leven": "^3.1.0", - "pretty-format": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-validate/node_modules/camelcase": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/jest-watcher": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.7.0.tgz", - "integrity": "sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/test-result": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", - "emittery": "^0.13.1", - "jest-util": "^29.7.0", - "string-length": "^4.0.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-worker": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz", - "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*", - "jest-util": "^29.7.0", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-worker/node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, - "node_modules/js-cleanup": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/js-cleanup/-/js-cleanup-1.2.0.tgz", - "integrity": "sha512-JeDD0yiiSt80fXzAVa/crrS0JDPQljyBG/RpOtaSbyDq03VHa9szJWMaWOYU/bcTn412uMN2MxApXq8v79cUiQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "magic-string": "^0.25.7", - "perf-regexes": "^1.0.1", - "skip-regex": "^1.0.2" - }, - "engines": { - "node": "^10.14.2 || >=12.0.0" - } - }, - "node_modules/js-cleanup/node_modules/magic-string": { - "version": "0.25.9", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.9.tgz", - "integrity": "sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "sourcemap-codec": "^1.4.8" - } - }, - "node_modules/js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/jsesc": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", - "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", - "dev": true, - "license": "MIT", - "bin": { - "jsesc": "bin/jsesc" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/json-parse-even-better-errors": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", - "dev": true, - "license": "MIT" - }, - "node_modules/json5": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", - "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", - "dev": true, - "license": "MIT", - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/jsonc-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.3.1.tgz", - "integrity": "sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/kleur": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz", - "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/leven": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", - "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/lines-and-columns": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", - "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", - "dev": true, - "license": "MIT" - }, - "node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/lodash.memoize": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", - "integrity": "sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==", - "dev": true, - "license": "MIT" - }, - "node_modules/lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^3.0.2" - } - }, - "node_modules/lunr": { - "version": "2.3.9", - "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.9.tgz", - "integrity": "sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==", - "dev": true, - "license": "MIT" - }, - "node_modules/magic-string": { - "version": "0.30.17", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.17.tgz", - "integrity": "sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/sourcemap-codec": "^1.5.0" - } - }, - "node_modules/make-dir": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", - "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", - "dev": true, - "license": "MIT", - "dependencies": { - "semver": "^7.5.3" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/make-error": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", - "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", - "dev": true, - "license": "ISC" - }, - "node_modules/makeerror": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", - "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "tmpl": "1.0.5" - } - }, - "node_modules/marked": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/marked/-/marked-4.3.0.tgz", - "integrity": "sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==", - "dev": true, - "license": "MIT", - "bin": { - "marked": "bin/marked.js" - }, - "engines": { - "node": ">= 12" - } - }, - "node_modules/merge-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true, - "license": "MIT" - }, - "node_modules/micromatch": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", - "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", - "dev": true, - "license": "MIT", - "dependencies": { - "braces": "^3.0.3", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/micromatch/node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true, - "license": "MIT" - }, - "node_modules/natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", - "dev": true, - "license": "MIT" - }, - "node_modules/node-fetch": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", - "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", - "dev": true, - "license": "MIT", - "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } - }, - "node_modules/node-int64": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", - "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==", - "dev": true, - "license": "MIT" - }, - "node_modules/node-releases": { - "version": "2.0.19", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.19.tgz", - "integrity": "sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==", - "dev": true, - "license": "MIT" - }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/npm-run-path": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", - "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", - "dev": true, - "license": "MIT", - "dependencies": { - "path-key": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dev": true, - "license": "ISC", - "dependencies": { - "wrappy": "1" - } - }, - "node_modules/onetime": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", - "dev": true, - "license": "MIT", - "dependencies": { - "mimic-fn": "^2.1.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/p-locate/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/parse-json": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", - "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-even-better-errors": "^2.3.0", - "lines-and-columns": "^1.1.6" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true, - "license": "MIT" - }, - "node_modules/perf-regexes": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/perf-regexes/-/perf-regexes-1.0.1.tgz", - "integrity": "sha512-L7MXxUDtqr4PUaLFCDCXBfGV/6KLIuSEccizDI7JxT+c9x1G1v04BQ4+4oag84SHaCdrBgQAIs/Cqn+flwFPng==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.14" - } - }, - "node_modules/picocolors": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", - "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", - "dev": true, - "license": "ISC" - }, - "node_modules/picomatch": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", - "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/pirates": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz", - "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 6" - } - }, - "node_modules/pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "find-up": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/pretty-format": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", - "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/schemas": "^29.6.3", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/pretty-format/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/prompts": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", - "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "kleur": "^3.0.3", - "sisteransi": "^1.0.5" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/prompts/node_modules/kleur": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", - "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/pure-rand": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.1.0.tgz", - "integrity": "sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/dubzzz" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/fast-check" - } - ], - "license": "MIT" - }, - "node_modules/react-is": { - "version": "18.3.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", - "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", - "dev": true, - "license": "MIT" - }, - "node_modules/require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/resolve": { - "version": "1.22.10", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.10.tgz", - "integrity": "sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-core-module": "^2.16.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/resolve-cwd": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", - "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", - "dev": true, - "license": "MIT", - "dependencies": { - "resolve-from": "^5.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/resolve.exports": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.3.tgz", - "integrity": "sha512-OcXjMsGdhL4XnbShKpAcSqPMzQoYkYyhbEaeSko47MjRP9NfEQMhZkXL1DoFlt9LWQn4YttrdnV6X2OiyzBi+A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - } - }, - "node_modules/rollup": { - "version": "4.34.6", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.34.6.tgz", - "integrity": "sha512-wc2cBWqJgkU3Iz5oztRkQbfVkbxoz5EhnCGOrnJvnLnQ7O0WhQUYyv18qQI79O8L7DdHrrlJNeCHd4VGpnaXKQ==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@types/estree": "1.0.6" - }, - "bin": { - "rollup": "dist/bin/rollup" - }, - "engines": { - "node": ">=18.0.0", - "npm": ">=8.0.0" - }, - "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.34.6", - "@rollup/rollup-android-arm64": "4.34.6", - "@rollup/rollup-darwin-arm64": "4.34.6", - "@rollup/rollup-darwin-x64": "4.34.6", - "@rollup/rollup-freebsd-arm64": "4.34.6", - "@rollup/rollup-freebsd-x64": "4.34.6", - "@rollup/rollup-linux-arm-gnueabihf": "4.34.6", - "@rollup/rollup-linux-arm-musleabihf": "4.34.6", - "@rollup/rollup-linux-arm64-gnu": "4.34.6", - "@rollup/rollup-linux-arm64-musl": "4.34.6", - "@rollup/rollup-linux-loongarch64-gnu": "4.34.6", - "@rollup/rollup-linux-powerpc64le-gnu": "4.34.6", - "@rollup/rollup-linux-riscv64-gnu": "4.34.6", - "@rollup/rollup-linux-s390x-gnu": "4.34.6", - "@rollup/rollup-linux-x64-gnu": "4.34.6", - "@rollup/rollup-linux-x64-musl": "4.34.6", - "@rollup/rollup-win32-arm64-msvc": "4.34.6", - "@rollup/rollup-win32-ia32-msvc": "4.34.6", - "@rollup/rollup-win32-x64-msvc": "4.34.6", - "fsevents": "~2.3.2" - } - }, - "node_modules/rollup-plugin-cleanup": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/rollup-plugin-cleanup/-/rollup-plugin-cleanup-3.2.1.tgz", - "integrity": "sha512-zuv8EhoO3TpnrU8MX8W7YxSbO4gmOR0ny06Lm3nkFfq0IVKdBUtHwhVzY1OAJyNCIAdLiyPnOrU0KnO0Fri1GQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "js-cleanup": "^1.2.0", - "rollup-pluginutils": "^2.8.2" - }, - "engines": { - "node": "^10.14.2 || >=12.0.0" - }, - "peerDependencies": { - "rollup": ">=2.0" - } - }, - "node_modules/rollup-plugin-dts": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/rollup-plugin-dts/-/rollup-plugin-dts-6.1.1.tgz", - "integrity": "sha512-aSHRcJ6KG2IHIioYlvAOcEq6U99sVtqDDKVhnwt70rW6tsz3tv5OSjEiWcgzfsHdLyGXZ/3b/7b/+Za3Y6r1XA==", - "dev": true, - "license": "LGPL-3.0-only", - "dependencies": { - "magic-string": "^0.30.10" - }, - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/Swatinem" - }, - "optionalDependencies": { - "@babel/code-frame": "^7.24.2" - }, - "peerDependencies": { - "rollup": "^3.29.4 || ^4", - "typescript": "^4.5 || ^5.0" - } - }, - "node_modules/rollup-pluginutils": { - "version": "2.8.2", - "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz", - "integrity": "sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "estree-walker": "^0.6.1" - } - }, - "node_modules/rollup-pluginutils/node_modules/estree-walker": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.1.tgz", - "integrity": "sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==", - "dev": true, - "license": "MIT" - }, - "node_modules/semver": { - "version": "7.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", - "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "license": "MIT", - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/shiki": { - "version": "0.14.7", - "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.14.7.tgz", - "integrity": "sha512-dNPAPrxSc87ua2sKJ3H5dQ/6ZaY8RNnaAqK+t0eG7p0Soi2ydiqbGOTaZCqaYvA/uZYfS1LJnemt3Q+mSfcPCg==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-sequence-parser": "^1.1.0", - "jsonc-parser": "^3.2.0", - "vscode-oniguruma": "^1.7.0", - "vscode-textmate": "^8.0.0" - } - }, - "node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true, - "license": "ISC" - }, - "node_modules/sisteransi": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", - "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", - "dev": true, - "license": "MIT" - }, - "node_modules/skip-regex": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/skip-regex/-/skip-regex-1.0.2.tgz", - "integrity": "sha512-pEjMUbwJ5Pl/6Vn6FsamXHXItJXSRftcibixDmNCWbWhic0hzHrwkMZo0IZ7fMRH9KxcWDFSkzhccB4285PutA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4.2" - } - }, - "node_modules/slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/source-map-support": { - "version": "0.5.13", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", - "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", - "dev": true, - "license": "MIT", - "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "node_modules/sourcemap-codec": { - "version": "1.4.8", - "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", - "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==", - "deprecated": "Please use @jridgewell/sourcemap-codec instead", - "dev": true, - "license": "MIT" - }, - "node_modules/sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", - "dev": true, - "license": "BSD-3-Clause" - }, - "node_modules/stack-utils": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", - "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "escape-string-regexp": "^2.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/string-length": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", - "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "char-regex": "^1.0.2", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-bom": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", - "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-final-newline": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", - "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/test-exclude": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", - "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", - "dev": true, - "license": "ISC", - "dependencies": { - "@istanbuljs/schema": "^0.1.2", - "glob": "^7.1.4", - "minimatch": "^3.0.4" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/test-exclude/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/test-exclude/node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/test-exclude/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/tmpl": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", - "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", - "dev": true, - "license": "BSD-3-Clause" - }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", - "dev": true, - "license": "MIT" - }, - "node_modules/ts-jest": { - "version": "29.2.5", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.2.5.tgz", - "integrity": "sha512-KD8zB2aAZrcKIdGk4OwpJggeLcH1FgrICqDSROWqlnJXGCXK4Mn6FcdK2B6670Xr73lHMG1kHw8R87A0ecZ+vA==", - "dev": true, - "license": "MIT", - "dependencies": { - "bs-logger": "^0.2.6", - "ejs": "^3.1.10", - "fast-json-stable-stringify": "^2.1.0", - "jest-util": "^29.0.0", - "json5": "^2.2.3", - "lodash.memoize": "^4.1.2", - "make-error": "^1.3.6", - "semver": "^7.6.3", - "yargs-parser": "^21.1.1" - }, - "bin": { - "ts-jest": "cli.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" - }, - "peerDependencies": { - "@babel/core": ">=7.0.0-beta.0 <8", - "@jest/transform": "^29.0.0", - "@jest/types": "^29.0.0", - "babel-jest": "^29.0.0", - "jest": "^29.0.0", - "typescript": ">=4.3 <6" - }, - "peerDependenciesMeta": { - "@babel/core": { - "optional": true - }, - "@jest/transform": { - "optional": true - }, - "@jest/types": { - "optional": true - }, - "babel-jest": { - "optional": true - }, - "esbuild": { - "optional": true - } - } - }, - "node_modules/type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/type-fest": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", - "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/typedoc": { - "version": "0.24.8", - "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.24.8.tgz", - "integrity": "sha512-ahJ6Cpcvxwaxfu4KtjA8qZNqS43wYt6JL27wYiIgl1vd38WW/KWX11YuAeZhuz9v+ttrutSsgK+XO1CjL1kA3w==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "lunr": "^2.3.9", - "marked": "^4.3.0", - "minimatch": "^9.0.0", - "shiki": "^0.14.1" - }, - "bin": { - "typedoc": "bin/typedoc" - }, - "engines": { - "node": ">= 14.14" - }, - "peerDependencies": { - "typescript": "4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x" - } - }, - "node_modules/typedoc/node_modules/minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/typescript": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.1.6.tgz", - "integrity": "sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==", - "dev": true, - "license": "Apache-2.0", - "peer": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, - "node_modules/undici-types": { - "version": "6.20.0", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz", - "integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==", - "dev": true, - "license": "MIT" - }, - "node_modules/universal-user-agent": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.1.tgz", - "integrity": "sha512-yCzhz6FN2wU1NiiQRogkTQszlQSlpWaw8SvVegAc+bDxbzHgh1vX8uIe8OYyMH6DwH+sdTJsgMl36+mSMdRJIQ==", - "dev": true, - "license": "ISC" - }, - "node_modules/update-browserslist-db": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.2.tgz", - "integrity": "sha512-PPypAm5qvlD7XMZC3BujecnaOxwhrtoFR+Dqkk5Aa/6DssiH0ibKoketaj9w8LP7Bont1rYeoV5plxD7RTEPRg==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "escalade": "^3.2.0", - "picocolors": "^1.1.1" - }, - "bin": { - "update-browserslist-db": "cli.js" - }, - "peerDependencies": { - "browserslist": ">= 4.21.0" - } - }, - "node_modules/v8-to-istanbul": { - "version": "9.3.0", - "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz", - "integrity": "sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==", - "dev": true, - "license": "ISC", - "dependencies": { - "@jridgewell/trace-mapping": "^0.3.12", - "@types/istanbul-lib-coverage": "^2.0.1", - "convert-source-map": "^2.0.0" - }, - "engines": { - "node": ">=10.12.0" - } - }, - "node_modules/vscode-oniguruma": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/vscode-oniguruma/-/vscode-oniguruma-1.7.0.tgz", - "integrity": "sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA==", - "dev": true, - "license": "MIT" - }, - "node_modules/vscode-textmate": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-8.0.0.tgz", - "integrity": "sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg==", - "dev": true, - "license": "MIT" - }, - "node_modules/walker": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", - "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "makeerror": "1.0.12" - } - }, - "node_modules/webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", - "dev": true, - "license": "BSD-2-Clause" - }, - "node_modules/whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "dev": true, - "license": "MIT", - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, - "node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true, - "license": "ISC" - }, - "node_modules/write-file-atomic": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz", - "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==", - "dev": true, - "license": "ISC", - "dependencies": { - "imurmurhash": "^0.1.4", - "signal-exit": "^3.0.7" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=10" - } - }, - "node_modules/yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", - "dev": true, - "license": "ISC" - }, - "node_modules/yargs": { - "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", - "dev": true, - "license": "MIT", - "dependencies": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=12" - } - }, - "node_modules/yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - } - } -} diff --git a/package.json b/package.json deleted file mode 100644 index 84fd1bab0..000000000 --- a/package.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "name": "extra-array", - "version": "4.3.0", - "description": "An array is a collection of values, stored contiguously.", - "main": "index.js", - "module": "index.mjs", - "sideEffects": false, - "exports": { - "require": { - "default": "./index.js", - "types": "./index.d.ts" - }, - "import": { - "default": "./index.mjs", - "types": "./index.d.ts" - } - }, - "scripts": { - "test": "jest", - "build": "node ./build", - "publish-docs": "node ./build publish-docs", - "publish-packages": "node ./build publish-packages" - }, - "keywords": [ - "extra", - "array" - ], - "author": "wolfram77@gmail.com", - "license": "MIT", - "repository": { - "type": "git", - "url": "git+https://github.com/nodef/extra-array.git" - }, - "bugs": { - "url": "https://github.com/nodef/extra-array/issues" - }, - "homepage": "https://github.com/nodef/extra-array#readme", - "devDependencies": { - "@rollup/plugin-commonjs": "^25.0.8", - "@rollup/plugin-node-resolve": "^15.3.0", - "@types/jest": "^29.5.13", - "extra-build": "^2.2.46", - "extra-function": "^1.3.1", - "extra-math": "^1.5.0", - "jest": "^29.7.0", - "rollup-plugin-cleanup": "^3.2.1", - "rollup-plugin-dts": "^6.1.1", - "ts-jest": "^29.2.5" - } -} diff --git a/rollup.config.js b/rollup.config.js deleted file mode 100644 index bee7b7a68..000000000 --- a/rollup.config.js +++ /dev/null @@ -1,31 +0,0 @@ -const resolve = require('@rollup/plugin-node-resolve').default; -const commonjs = require('@rollup/plugin-commonjs').default; -const cleanup = require('rollup-plugin-cleanup'); -const dts = require('rollup-plugin-dts').default; - - -module.exports = [{ - input: '.build/index.d.ts', - output: { - file: 'index.d.ts', - format: 'es', - exports: 'auto' - }, - plugins: [dts()], -}, { - input: '.build/index.js', - output: { - file: 'index.js', - format: 'cjs', - exports: 'auto' - }, - plugins: [resolve(), commonjs(), cleanup({comments: 'none'})], -}, { - input: '.build/index.js', - output: { - file: 'index.mjs', - format: 'es', - exports: 'auto' - }, - plugins: [resolve(), commonjs(), cleanup({comments: 'none'})], -}]; diff --git a/src/index.ts b/src/index.ts deleted file mode 100644 index a89e4e6cd..000000000 --- a/src/index.ts +++ /dev/null @@ -1,3624 +0,0 @@ -import {mod} from "extra-math"; -import { - IDENTITY, - COMPARE, -} from "extra-function"; - - - - -// #region TYPES -// ============= - -/** Entries is an array of index-value pairs, with unique indices. */ -export type Entries = [number, T][]; -/** IEntries is a list of index-value pairs, with unique indices. */ -export type IEntries = Iterable<[number, T]>; - - -/** Lists is a pair of index array and value array, with unique indices. */ -export type Lists = [number[], T[]]; -/** ILists is a pair of index iterable list and value iterable list, with unique indices. */ -export type ILists = [Iterable, Iterable]; - - -/** - * Handle reading of a single value. - * @returns value - */ -export type ReadFunction = () => T; - - -/** - * Handle combining of two values. - * @param a a value - * @param b another value - * @returns combined value - */ -export type CombineFunction = (a: T, b: T) => T; - - -/** - * Handle comparison of two values. - * @param a a value - * @param b another value - * @returns ab: +ve - */ -export type CompareFunction = (a: T, b: T) => number; - - -/** - * Handle processing of values in an array. - * @param v value in array - * @param i index of value in array - * @param x array containing the value - */ -export type ProcessFunction = (v: T, i: number, x: T[]) => void; - - -/** - * Handle selection of values in an array. - * @param v value in array - * @param i index of value in array - * @param x array containing the value - * @returns selected? - */ -export type TestFunction = (v: T, i: number, x: T[]) => boolean; - - -/** - * Handle transformation of a value to another. - * @param v value in array - * @param i index of value in array - * @param x array containing the value - * @returns transformed value - */ -export type MapFunction = (v: T, i: number, x: T[]) => U; - - -/** - * Handle reduction of multiple values into a single value. - * @param acc accumulator (temporary result) - * @param v value in array - * @param i index of value in array - * @param x array containing the value - * @returns reduced value - */ -export type ReduceFunction = (acc: U, v: T, i: number, x: T[]) => U; - - -/** - * Handle ending of a combined array. - * @param dones iᵗʰ array done? - * @returns combined array done? - */ -export type EndFunction = (dones: boolean[]) => boolean; - - -/** - * Handle swapping of two values in an array. - * @param x an array (updated!) - * @param i an index - * @param j another index - * @returns x | x[i] ⇔ x[j] - */ -export type SwapFunction = (x: T[], i: number, j: number) => T[]; -// #endregion - - - - -// #region METHODS -// =============== - -// #region HELPERS -// --------------- - -/** Convert an iterable to set. */ -function toSet(x: T[], fm: MapFunction | null=null): Set { - if (!fm) return new Set(x); - var a = new Set(), i = -1; - for (var v of x) - a.add(fm(v, ++i, x)); - return a; -} -// #endregion - - - - -// #region GENERATE -// ---------------- - -/** - * Generate array from given number range. - * @param v start number - * @param V end number, excluding - * @param dv step size [1] - * @returns [v, v+dv, v+2dv, ...] - */ -export function fromRange(v: number, V: number, dv: number=1): number[] { - var n = (V - v)/dv, a = []; - for (var i=0; i(fn: Function, n: number): T[] { - var a = []; - for (var i=0; i(fm: MapFunction, v: T, n: number): T[] { - var a = []; - if (n!==0) a.push(v); - for (var i=1; i!==n; ++i) - a.push(v = fm(v, i, null)); - return a; -} -export {fromApplication as fromApply}; - - -/** - * Convert an iterable to array. - * @param x an iterable - * @returns x as array - */ -export function fromIterable(x: Iterable): T[] { - return [...x]; -} -export {fromIterable as from}; - - -/** - * Convert an iterable to array! - * @param x an iterable (updatable if array!) - * @returns x as array - */ -export function fromIterable$(x: Iterable): T[] { - return Array.isArray(x)? x : [...x]; -} -export {fromIterable$ as from$}; -// #endregion - - - - -// #region CLONE -// ------------- - -/** - * Shallow clone an array. - * @param x an array - * @returns shallow clone of x - */ -export function shallowClone(x: T[]): T[] { - return x.slice(); -} -export {shallowClone as clone}; - - -/** - * Deep clone an array. - * @param x an array - * @returns deep clone of x - */ -export function deepClone(x: T[]): T[] { - return structuredClone(x); -} -// #endregion - - - - -// #region ABOUT -// ------------- - -/** - * Check if value is an array. - * @param v a value - * @returns v is an array? - */ -export function is(v: any): v is any[] { - return Array.isArray(v); -} - - -/** - * Obtain all indices. - * @param x an array - * @returns [0, 1, ..., |x|-1] - */ -export function keys(x: T[]): number[] { - return [...x.keys()]; -} - - -/** - * List all indices. - * @param x an array - * @returns 0, 1, ..., |x|-1 - */ -export function ikeys(x: T[]): IterableIterator { - return x.keys(); -} - - -/** - * Get all values. - * @param x an array - * @returns [v₀, v₁, ...] | vᵢ = x[i] - */ -export function values(x: T[]): T[] { - return x.slice(); -} - - -/** - * List all values. - * @param x an array - * @returns v₀, v₁, ... | vᵢ = x[i] - */ -export function ivalues(x: T[]): IterableIterator { - return x.values(); -} - - -/** - * Obtain all index-value pairs. - * @param x an array - * @returns [[0, v₀], [1, v₁], ...] | vᵢ = x[i] - */ -export function entries(x: T[]): Entries { - return [...x.entries()]; -} - - -/** - * List all index-value pairs. - * @param x an array - * @returns [0, v₀], [1, v₁], ... | vᵢ = x[i] - */ -export function ientries(x: T[]): IEntries { - return x.entries(); -} -// #endregion - - - - -// #region INDEX -// ------------- - -/** - * Get zero-based index for an element in array. - * @param x an array - * @param i ±index - * @returns i' | x[i'] = x[i]; i' ∈ [0, |x|] - */ -export function index(x: T[], i: number): number { - var X = x.length; - return i>=0? Math.min(i, X) : Math.max(X+i, 0); -} - - -/** - * Get zero-based index range for part of array. - * @param x an array - * @param i begin ±index [0] - * @param I end ±index (exclusive) [|x|] - * @returns [i', I'] | i' ≤ I'; i', I' ∈ [0, |x|] - */ -export function indexRange(x: T[], i: number=0, I: number=x.length): [number, number] { - var X = x.length; - var i = i>=0? Math.min(i, X) : Math.max(X+i, 0); - var I = I>=0? Math.min(I, X) : Math.max(X+I, 0); - return [i, Math.max(i, I)]; -} -// #endregion - - - - -// #region LENGTH -// -------------- - -/** - * Check if an array is empty. - * @param x an array - * @returns |x| = 0? - */ -export function isEmpty(x: T[]): boolean { - return x.length===0; -} - - -/** - * Find the length of an array. - * @param x an array - * @param i begin ±index [0] - * @param I end ±index (exclusive) [X] - * @returns |x[i..I]| - */ -export function length(x: T[], i: number=0, I: number=x.length): number { - var [i, I] = indexRange(x, i, I); - return I-i; -} -export {length as size}; - - -/** - * Resize an array to given length! - * @param x an array - * @param n new length - * @param vd default value - * @returns resized x - */ -export function resize$(x: T[], n: number, vd: T) { - var X = x.length; x.length = n; - if (n>X) x.fill(vd, X); - return x; -} - - -/** - * Remove all elements from an array! - * @param x an array (updated!) - * @returns cleared x - */ -export function clear$(x: T[]) { - x.length = 0; - return x; -} -// #endregion - - - - -// #region GET/SET -// --------------- - -/** - * Get value at index. - * @param x an array - * @param i index - * @returns x[i] - */ -export function get(x: T[], i: number): T { - return x[index(x, i)]; -} -export {get as at}; - - -// Get values at index range. -// export {slice as getRange}; - - -/** - * Get values at indices. - * @param x an array - * @param is indices - * @returns [x[i₀], x[i₁], ...] | [i₀, i₁, ...] = is - */ -export function getAll(x: T[], is: number[]): T[] { - return is.map(i => get(x, i)); -} - - -/** - * Get value at path in a nested array. - * @param x a nested array - * @param p path - * @returns x[i₀][i₁][...] | [i₀, i₁, ...] = p - */ -export function getPath(x: any[], p: number[]): any { - for (var i of p) - x = is(x)? get(x, i) : undefined; - return x; -} - - -/** - * Check if nested array has a path. - * @param x a nested array - * @param p path - * @returns x[i₀][i₁][...] exists? | [i₀, i₁, ...] = p - */ -export function hasPath(x: any[], p: number[]): boolean { - for (var i of p) { - if (!is(x)) return false; - x = get(x, i); - } - return true; -} - - -/** - * Set value at index. - * @param x an array - * @param i index - * @param v value - * @returns x' | x' = x; x'[i] = v - */ -export function set(x: T[], i: number, v: T): T[] { - return set$(x.slice(), i, v); -} -export {set as with}; - - -/** - * Set value at index! - * @param x an array (updated!) - * @param i index - * @param v value - * @returns x | x[i] = v - */ -export function set$(x: T[], i: number, v: T): T[] { - x[index(x, i)] = v; - return x; -} - - -// TODO: setRange$() -// TODO: setAll$() - - -/** - * Set value at path in a nested array! - * @param x a nested array (updated!) - * @param p path - * @param v value - * @returns x | x[i₀][i₁][...] = v; [i₀, i₁, ...] = p - */ -export function setPath$(x: any[], p: number[], v: any): any[] { - var y = getPath(x, p.slice(0, -1)); - if (is(y)) set$(y, last(p), v); - return x; -} - - -/** - * Exchange two values. - * @param x an array - * @param i an index - * @param j another index - * @returns x' | x' = x; x'[i] = x[j]; x'[j] = x[i] - */ -export function swap(x: T[], i: number, j: number): T[] { - return swap$(x.slice(), i, j); -} - - -/** - * Exchange two values! - * @param x an array (updated!) - * @param i an index - * @param j another index - * @returns x | x[i] ⇔ x[j] - */ -export function swap$(x: T[], i: number, j: number): T[] { - var i = index(x, i), j = index(x, j); - var t = x[i]; x[i] = x[j]; x[j] = t; - return x; -} - - -/** - * Exchange two values! - * @param x an array (updated!) - * @param i an +ve index - * @param j another +ve index - * @returns x | x[i] ⇔ x[j] - */ -function swapRaw$(x: T[], i: number, j: number): T[] { - var t = x[i]; x[i] = x[j]; x[j] = t; - return x; -} -// NOTE: May also be called swapUnchecked$(). - - -/** - * Exchange two ranges of values. - * @param x an array - * @param i begin index of first range - * @param I end index of first range (exclusive) - * @param j begin index of second range - * @param J end index of second range (exclusive) - * @returns x' | x' = x; x'[i..I] = x[j..J]; x'[j..J] = x[i..I] - */ -export function swapRanges(x: T[], i: number, I: number, j: number, J: number): T[] { - var [i, I] = indexRange(x, i, I); - var [j, J] = indexRange(x, j, J); - if (j(x: T[], i: number, I: number, j: number, J: number): T[] { - var [i, I] = indexRange(x, i, I); - var [j, J] = indexRange(x, j, J); - if (j(x: T[], i: number): T[] { - var i = index(x, i); - return x.slice(0, i).concat(x.slice(i+1)); -} - - -/** - * Remove value at index! - * @param x an array (updated!) - * @param i index - * @returns x \\: [i] - */ -export function remove$(x: T[], i: number): T[] { - x.splice(i, 1); - return x; -} - - -/** - * Remove value at path in a nested array! - * @param x a nested array (updated!) - * @param p path - * @returns x \\: [i₀][i₁][...] | [i₀, i₁, ...] = p - */ -export function removePath$(x: any[], p: number[]): any[] { - var y = getPath(x, p.slice(0, -1)); - if (is(y)) y.splice(last(p), 1); - return x; -} -// #endregion - - - - -// #region SORT -// ------------ - -/** - * Examine if array is sorted. - * @param x an array - * @param fc compare function (a, b) - * @param fm map function (v, i, x) - * @returns x is sorted? - */ -export function isSorted(x: T[], fc: CompareFunction | null=null, fm: MapFunction | null=null): boolean { - return searchUnsortedValue(x, fc, fm) === -1; -} - - -/** - * Examine if array has an unsorted value. - * @param x an array - * @param fc compare function (a, b) - * @param fm map function (v, i, x) - * @returns x is not sorted? - */ -export function hasUnsortedValue(x: T[], fc: CompareFunction | null=null, fm: MapFunction | null=null): boolean { - return searchUnsortedValue(x, fc, fm) >= 0; -} - - -/** - * Find first index of an unsorted value. - * @param x an array - * @param fc compare function (a, b) - * @param fm map function (v, i, x) - * @returns index of first unsorted value, -1 if sorted - */ -export function searchUnsortedValue(x: T[], fc: CompareFunction | null=null, fm: MapFunction | null=null): number { - var fc = fc || COMPARE; - var fm = fm || IDENTITY; - var X = x.length; - if (X<=1) return -1; - var w0 = fm(x[0], 0, x); - for (var i=1; i0) return i; - w0 = w; - } - return -1; -} - - -/** - * Arrange values in order. - * @param x an array - * @param fc compare function (a, b) - * @param fm map function (v, i, x) - * @param fs swap function (x, i, j) - * @returns x' | x' = x; x'[i] ≤ x'[j] ∀ i ≤ j - */ -export function sort(x: T[], fc: CompareFunction | null=null, fm: MapFunction | null=null, fs: SwapFunction | null=null): T[] { - return sort$(x.slice(), fc, fm, fs); -} -export {sort as toSorted}; - - -/** - * Arrange values in order! - * @param x an array (updated!) - * @param fc compare function (a, b) - * @param fm map function (v, i, x) - * @param fs swap function (x, i, j) - * @returns x | x[i] ≤ x[j] ∀ i ≤ j - */ -export function sort$(x: T[], fc: CompareFunction | null=null, fm: MapFunction | null=null, fs: SwapFunction | null=null): T[] { - var fc = fc || COMPARE; - if (!fm && !fs) return x.sort(fc); - var X = x.length; - var fm = fm || IDENTITY; - var fs = fs || swapRaw$; - return rangedPartialIntroSort$(x, 0, X, X, fc, fm, fs); -} - - -/** - * Arrange a range of values in order. - * @param x an array - * @param i begin index - * @param I end index (exclusive) - * @param fc compare function (a, b) - * @param fm map function (v, i, x) - * @param fs swap function (x, i, j) - * @returns x' | x' = x; x'[i] ≤ x'[j] ∀ i ≤ j - */ -export function rangedSort(x: T[], i: number, I: number, fc: CompareFunction | null=null, fm: MapFunction | null=null, fs: SwapFunction | null=null): T[] { - return rangedSort$(x.slice(), i, I, fc, fm, fs); -} - - -/** - * Arrange a range of values in order! - * @param x an array (updated!) - * @param i begin index - * @param I end index (exclusive) - * @param fc compare function (a, b) - * @param fm map function (v, i, x) - * @param fs swap function (x, i, j) - * @returns x | x[i] ≤ x[j] ∀ i ≤ j - */ -export function rangedSort$(x: T[], i: number, I: number, fc: CompareFunction | null=null, fm: MapFunction | null=null, fs: SwapFunction | null=null): T[] { - var fc = fc || COMPARE; - var fm = fm || IDENTITY; - var fs = fs || swapRaw$; - var [i, I] = indexRange(x, i, I); - return rangedPartialIntroSort$(x, i, I, I-i, fc, fm, fs); -} - - -/** - * Partially arrange values in order. - * @param x an array - * @param n minimum number of values to sort - * @param fc compare function (a, b) - * @param fm map function (v, i, x) - * @param fs swap function (x, i, j) - * @returns x' | x' = x; x'[i] ≤ x'[j] ∀ i ≤ j - */ -export function partialSort(x: T[], n: number, fc: CompareFunction | null=null, fm: MapFunction | null=null, fs: SwapFunction | null=null): T[] { - return partialSort$(x.slice(), n, fc, fm, fs); -} - - -/** - * Partially arrange values in order! - * @param x an array (updated!) - * @param n minimum number of values to sort - * @param fc compare function (a, b) - * @param fm map function (v, i, x) - * @param fs swap function (x, i, j) - * @returns x | x[i] ≤ x[j] ∀ i ≤ j - */ -export function partialSort$(x: T[], n: number, fc: CompareFunction | null=null, fm: MapFunction | null=null, fs: SwapFunction | null=null): T[] { - return rangedPartialSort$(x, 0, x.length, n, fc, fm, fs); -} - - -/** - * Partially arrange a range of values in order. - * @param x an array - * @param i begin index - * @param I end index (exclusive) - * @param n minimum number of values to sort - * @param fc compare function (a, b) - * @param fm map function (v, i, x) - * @param fs swap function (x, i, j) - * @returns x' | x' = x; x'[i] ≤ x'[j] ∀ i ≤ j - */ -export function rangedPartialSort(x: T[], i: number, I: number, n: number, fc: CompareFunction | null=null, fm: MapFunction | null=null, fs: SwapFunction | null=null): T[] { - return rangedPartialSort$(x.slice(), i, I, n, fc, fm, fs); -} - - -/** - * Partially arrange a range of values in order! - * @param x an array (updated!) - * @param i begin index - * @param I end index (exclusive) - * @param n minimum number of values to sort - * @param fc compare function (a, b) - * @param fm map function (v, i, x) - * @param fs swap function (x, i, j) - * @returns x | x[i] ≤ x[j] ∀ i ≤ j - */ -export function rangedPartialSort$(x: T[], i: number, I: number, n: number, fc: CompareFunction | null=null, fm: MapFunction | null=null, fs: SwapFunction | null=null): T[] { - var fc = fc || COMPARE; - var fm = fm || IDENTITY; - var fs = fs || swapRaw$; - var [i, I] = indexRange(x, i, I); - return rangedPartialIntroSort$(x, i, I, n, fc, fm, fs); -} - - -/** - * Partially arrange values in order! - * @param x an array (updated!) - * @param i begin index - * @param I end index (exclusive) - * @param n minimum number of values to sort - * @param fc compare function (a, b) - * @param fm map function (v, i, x) - * @param fs swap function (x, i, j) - * @returns x | x[i] ≤ x[j] ∀ i ≤ j - */ -function rangedPartialIntroSort$(x: T[], i: number, I: number, n: number, fc: CompareFunction, fm: MapFunction, fs: SwapFunction): T[] { - var d = Math.floor(Math.log2(I-i)*2); // Maximum depth of recursion - var s = 16; // When to switch to insertion sort - return rangedPartialIntroSortDo$(x, i, I, d, s, n, fc, fm, fs); -} - - -// Partially arrange a range of values in order with hybrid quick sort, heap sort, and insertion sort. -function rangedPartialIntroSortDo$(x: T[], i: number, I: number, d: number, s: number, n: number, fc: CompareFunction, fm: MapFunction, fs: SwapFunction): T[] { - if (n<=0 || I-i<=1) return x; // Nothing to sort - if (I-i<=s) return rangedPartialInsertionSort$(x, i, I, n, fc, fm, fs); // Insertion sort - if (d<=0) return rangedPartialHeapSort$(x, i, I, n, fc, fm, fs); // Heap sort - var p = i + Math.floor((I-i)*Math.random()); // Choose pivot - var p = rangedQuickSortPartition$(x, i, I, p, fc, fm, fs); // Partition array - rangedPartialIntroSortDo$(x, i, p, d, s, Math.min(p-i, n), fc, fm, fs); // Sort left part - rangedPartialIntroSortDo$(x, p+1, I, d, s, Math.min(I-p-1, n), fc, fm, fs); // Sort right part - return x; -} - - -/** - * Partially arrange a range of values in order! - * @param x an array (updated!) - * @param i begin index - * @param I end index (exclusive) - * @param n minimum number of values to sort - * @param fc compare function (a, b) - * @param fm map function (v, i, x) - * @param fs swap function (x, i, j) - * @returns x | x[i] ≤ x[j] ∀ i ≤ j - */ -function rangedPartialQuickSort$(x: T[], i: number, I: number, n: number, fc: CompareFunction, fm: MapFunction, fs: SwapFunction): T[] { - if (n<=0 || I-i<=1) return x; // Nothing to sort - var p = i + Math.floor((I-i)*Math.random()); // Choose pivot - var p = rangedQuickSortPartition$(x, i, I, p, fc, fm, fs); // Partition array - rangedPartialQuickSort$(x, i, p, Math.min(p-i, n), fc, fm, fs); // Sort left part - rangedPartialQuickSort$(x, p+1, I, Math.min(I-p-1, n), fc, fm, fs); // Sort right part - return x; -} - - -// TODO: Make this a generic function. -// Partition the array into two parts, such that values in the first part are less than values in the second part. -function rangedQuickSortPartition$(x: T[], i: number, I: number, p: number, fc: CompareFunction, fm: MapFunction, fs: SwapFunction): number { - var wp = fm(x[p], p, x); // Pivot value - var j = i-1; // Last index of values ≤ pivot - fs(x, p, I-1); // Move pivot to end - for (var k=i; k 0) continue; - fs(x, ++j, k); // Move value ≤ pivot to left - } - fs(x, ++j, I-1); // Move pivot to middle - return j; // Return pivot index -} - - -/** - * Partially arrange a range of values in order! - * @param x an array (updated!) - * @param i begin index - * @param I end index (exclusive) - * @param n minimum number of values to sort - * @param fc compare function (a, b) - * @param fm map function (v, i, x) - * @param fs swap function (x, i, j) - * @returns x | x[i] ≤ x[j] ∀ i ≤ j - */ -function rangedPartialHeapSort$(x: T[], i: number, I: number, n: number, fc: CompareFunction, fm: MapFunction, fs: SwapFunction): T[] { - rangedBuildReverseMinHeap$(x, i, I, fc, fm, fs); - for (var r=I-1; n>0 && i(x: T[], i: number, I: number, fc: CompareFunction, fm: MapFunction, fs: SwapFunction): void { - for (var r=I-Math.floor((I-i)/2); r(x: T[], i: number, I: number, r: number, fc: CompareFunction, fm: MapFunction, fs: SwapFunction): void { - var s = r; // Index of smallest value - var lt = 2*r - I; // Left child, reverse of lt = 2*r+1 - var rt = lt - 1; // Right child, reverse of rt = 2*r+2 - if (lt>=i && fc(fm(x[lt], lt, x), fm(x[s], s, x)) < 0) s = lt; // Left child is smaller? - if (rt>=i && fc(fm(x[rt], rt, x), fm(x[s], s, x)) < 0) s = rt; // Right child is smaller? - if (s !== r) { // Smallest is not root? - fs(x, s, r); // Swap root with smallest - rangedReverseMinHeapify$(x, i, I, s, fc, fm, fs); // Rebuild heap - } -} - - -// Build a max-heap from a range of values, where root node is the smallest and placed at the beginning. -function rangedBuildMaxHeap$(x: T[], i: number, I: number, fc: CompareFunction, fm: MapFunction, fs: SwapFunction): void { - for (var r=i+Math.floor((I-i)/2)-1; r>=i; --r) - rangedMaxHeapify$(x, i, I, r, fc, fm, fs); -} - - -/** - * Max-heapify a range of values, such that root node is the largest and placed at the beginning. - * @param x an array (updated!) - * @param i begin index - * @param I end index (exclusive) - * @param r root index - * @param fc compare function (a, b) - * @param fm map function (v, i, x) - * @param fs swap function (x, i, j) - */ -function rangedMaxHeapify$(x: T[], i: number, I: number, r: number, fc: CompareFunction, fm: MapFunction, fs: SwapFunction): void { - var s = r; // Index of largest value - var lt = 2*r - i + 1; // Left child, like lt = 2*r+1 - var rt = lt + 1; // Right child, like rt = 2*r+2 - if (lt 0) s = lt; // Left child is larger? - if (rt 0) s = rt; // Right child is larger? - if (s !== r) { // Largest is not root? - fs(x, s, r); // Swap root with largest - rangedMaxHeapify$(x, i, I, s, fc, fm, fs); // Rebuild heap - } -} - - -/** - * Partially arrange a range of values in order! - * @param x an array (updated!) - * @param i begin index - * @param I end index (exclusive) - * @param n minimum number of values to sort (ignored) - * @param fc compare function (a, b) - * @param fm map function (v, i, x) - * @param fs swap function (x, i, j) - * @returns x | x[i] ≤ x[j] ∀ i ≤ j - */ -function rangedPartialInsertionSort$(x: T[], i: number, I: number, n: number, fc: CompareFunction, fm: MapFunction, fs: SwapFunction): T[] { - // NOTE: Insertion sort does not support partial sorting, so we ignore n. - if (fs===swapRaw$) return rangedPartialInsertionSortSwapless$(x, i, I, n, fc, fm, fs); - else return rangedPartialInsertionSortSwap$ (x, i, I, n, fc, fm, fs); -} - - -// Sort a range of values in order with swap-enabled version of insertion sort. -function rangedPartialInsertionSortSwap$(x: T[], i: number, I: number, n: number, fc: CompareFunction, fm: MapFunction, fs: SwapFunction): T[] { - for (var j=i+1; j=i && fc(fm(x[k], k, x), wkey)>0; --k) - fs(x, k, k+1); - } - return x; -} - - -// Sort a range of values in order with swapless version of insertion sort. -function rangedPartialInsertionSortSwapless$(x: T[], i: number, I: number, n: number, fc: CompareFunction, fm: MapFunction, fs: SwapFunction): T[] { - for (var j=i+1; j=i && fc(fm(x[k], k, x), wkey)>0; --k) - x[k+1] = x[k]; - x[k+1] = key; - } - return x; -} - - -/** - * Partially arrange a range of values in order! - * @param x an array (updated!) - * @param i begin index - * @param I end index (exclusive) - * @param n minimum number of values to sort - * @param fc compare function (a, b) - * @param fm map function (v, i, x) - * @param fs swap function (x, i, j) - * @returns x | x[i] ≤ x[j] ∀ i ≤ j - */ -function rangedPartialSelectionSort$(x: T[], i: number, I: number, n: number, fc: CompareFunction, fm: MapFunction, fs: SwapFunction): T[] { - for (var j=i; n>0 && j 0) { l = k; wl = wk; } - } - fs(x, j, l); - } - return x; -} -// #endregion - - - - -// #region MINIMUM/MAXIMUM -// ----------------------- - -/** - * Find first smallest value. - * @param x an array - * @param fc compare function (a, b) - * @param fm map function (v, i, x) - * @returns v | v ≤ vᵢ; vᵢ ∈ x - */ -export function minimum(x: T[], fc: CompareFunction | null=null, fm: MapFunction | null=null): T { - var i = searchMinimumValue(x, fc, fm); - return x[i]; -} -export {minimum as min}; - - -/** - * Find first smallest entry. - * @param x an array - * @param fc compare function (a, b) - * @param fm map function (v, i, x) - * @returns [min_index, min_value] - */ -export function minimumEntry(x: T[], fc: CompareFunction | null=null, fm: MapFunction | null=null): [number, T] { - var i = searchMinimumValue(x, fc, fm); - return [i, x[i]]; -} -export {minimumEntry as minEntry}; - - -/** - * Find first largest value. - * @param x an array - * @param fc compare function (a, b) - * @param fm map function (v, i, x) - * @returns v | v ≥ vᵢ; vᵢ ∈ x - */ -export function maximum(x: T[], fc: CompareFunction | null=null, fm: MapFunction | null=null): T { - var i = searchMaximumValue(x, fc, fm); - return x[i]; -} -export {maximum as max}; - - -/** - * Find first largest entry. - * @param x an array - * @param fc compare function (a, b) - * @param fm map function (v, i, x) - * @returns [max_index, max_value] - */ -export function maximumEntry(x: T[], fc: CompareFunction | null=null, fm: MapFunction | null=null): [number, T] { - var i = searchMaximumValue(x, fc, fm); - return [i, x[i]]; -} -export {maximumEntry as maxEntry}; - - -/** - * Find smallest and largest values. - * @param x an array - * @param fc compare function (a, b) - * @param fm map function (v, i, x) - * @returns [min_value, max_value] - */ -export function range(x: T[], fc: CompareFunction | null=null, fm: MapFunction | null=null): [T, T] { - var [a, b] = rangeEntries(x, fc, fm); - return [a[1], b[1]]; -} - - -/** - * Find smallest and largest entries. - * @param x an array - * @param fc compare function (a, b) - * @param fm map function (v, i, x) - * @returns [min_entry, max_entry] - */ -export function rangeEntries(x: T[], fc: CompareFunction | null=null, fm: MapFunction | null=null): [[number, T], [number, T]] { - var fc = fc || COMPARE; - var fm = fm || IDENTITY; - var X = x.length; - if (X===0) return [[-1, undefined], [-1, undefined]]; - var v = x[0], w = fm(v, 0, x); - var mi = 0, mv = v, mw = w; - var ni = 0, nv = v, nw = w; - for (var i=1; i0) { ni = i; nv = v; nw = w; } - } - return [[mi, mv], [ni, nv]]; -} - - -/** - * Find smallest values. - * @param x an array - * @param n number of values - * @param fc compare function (a, b) - * @param fm map function (v, i, x) - * @returns n smallest values in ascending order - */ -export function minimums(x: T[], n: number, fc: CompareFunction | null=null, fm: MapFunction | null=null): T[] { - var is = searchMinimumValues(x, n, fc, fm); - return is.map(i => x[i]); -} - - -/** - * Find smallest entries. - * @param x an array - * @param n number of values - * @param fc compare function (a, b) - * @param fm map function (v, i, x) - * @returns n smallest entries in ascending order - */ -export function minimumEntries(x: T[], n: number, fc: CompareFunction | null=null, fm: MapFunction | null=null): [number, T][] { - var is = searchMinimumValues(x, n, fc, fm); - return is.map(i => [i, x[i]]); -} - - -/** - * Find largest values. - * @param x an array - * @param n number of values - * @param fc compare function (a, b) - * @param fm map function (v, i, x) - * @returns n largest values in descending order - */ -export function maximums(x: T[], n: number, fc: CompareFunction | null=null, fm: MapFunction | null=null): T[] { - var is = searchMaximumValues(x, n, fc, fm); - return is.map(i => x[i]); -} - - -/** - * Find largest entries. - * @param x an array - * @param n number of values - * @param fc compare function (a, b) - * @param fm map function (v, i, x) - * @returns n largest entries in descending order - */ -export function maximumEntries(x: T[], n: number, fc: CompareFunction | null=null, fm: MapFunction | null=null): [number, T][] { - var is = searchMaximumValues(x, n, fc, fm); - return is.map(i => [i, x[i]]); -} - - -/** - * Find first index of minimum value. - * @param x an array - * @param fc compare function (a, b) - * @param fm map function (v, i, x) - * @returns first index of minimum value, -1 if empty - */ -export function searchMinimumValue(x: T[], fc: CompareFunction | null=null, fm: MapFunction | null=null): number { - var fc = fc || COMPARE; - var fm = fm || IDENTITY; - var X = x.length; - if (X===0) return -1; - var mi = 0, mw = fm(x[0], 0, x); - for (var i=1; i(x: T[], fc: CompareFunction | null=null, fm: MapFunction | null=null): number { - var fc = fc || COMPARE; - var fm = fm || IDENTITY; - var X = x.length; - if (X===0) return -1; - var ni = 0, nw = fm(x[0], 0, x); - for (var i=1; i0) { ni = i; nw = w; } - } - return ni; -} - - -/** - * Find indices of minimum values. - * @param x an array - * @param n number of values - * @param fc compare function (a, b) - * @param fm map function (v, i, x) - * @returns indices of minimum values in ascending order - */ -export function searchMinimumValues(x: T[], n: number, fc: CompareFunction | null=null, fm: MapFunction | null=null): number[] { - var fc = fc || COMPARE; - var fm = fm || IDENTITY; - var X = x.length; - // Create a max heap of indices. - var IH = Math.min(n, X); - var ih = fromRange(0, IH); - rangedBuildMaxHeap$(ih, 0, IH, fc, i => fm(x[i], i, x), swapRaw$); - var wr = fm(x[ih[0]], ih[0], x); - // Search for minimum values, and update heap. - for (var i=n; i= 0) continue; - ih[0] = i; - rangedMaxHeapify$(ih, 0, IH, 0, fc, i => fm(x[i], i, x), swapRaw$); - var wr = fm(x[ih[0]], ih[0], x); - } - // Sort max heap in ascending order. - ih.sort((i, j) => fc(fm(x[i], i, x), fm(x[j], j, x))); - return ih; -} - - -/** - * Find indices of maximum values. - * @param x an array - * @param n number of values - * @param fc compare function (a, b) - * @param fm map function (v, i, x) - * @returns indices of maximum values in descending order - */ -export function searchMaximumValues(x: T[], n: number, fc: CompareFunction | null=null, fm: MapFunction | null=null): number[] { - var fc = fc || COMPARE; - var fd = (a: T|U, b: T|U) => -fc(a, b); - return searchMinimumValues(x, n, fd, fm); -} -// #endregion - - - - -// #region COMPARE -// --------------- - -/** - * Examine if two arrays are equal. - * @param x an array - * @param y another array - * @param fc compare function (a, b) - * @param fm map function (v, i, x) - * @returns x = y? - */ -export function isEqual(x: T[], y: T[], fc: CompareFunction | null=null, fm: MapFunction | null=null): boolean { - var X = x.length, Y = y.length; - return X===Y && compare(x, y, fc, fm)===0; -} - - -/** - * Compare two arrays (lexicographically). - * @param x an array - * @param y another array - * @param fc compare function (a, b) - * @param fm map function (v, i, x) - * @returns xy: +ve - */ -export function compare(x: T[], y: T[], fc: CompareFunction | null=null, fm: MapFunction | null=null): number { - var fc = fc || COMPARE; - var fm = fm || IDENTITY; - var X = x.length; - var Y = y.length; - for (var i=0, I=Math.min(X, Y); i(x: T[], vd?: T): T { - return x.length>0? x[0] : vd; -} -export {head as front}; -export {head as first}; - - -/** - * Get values except first. - * @param x an array - * @returns x[1..|x|] - */ -export function tail(x: T[]): T[] { - return x.slice(1); -} - - -/** - * Get values except last. - * @param x an array - * @returns x[0..|x|-1] - */ -export function init(x: T[]): T[] { - return x.slice(0, -1); -} - - -/** - * Get last value. - * @param x an array - * @param vd default value - * @returns x[|x|-1] || vd - */ -export function last(x: T[], vd?: T): T { - return x.length>0? x[x.length-1] : vd; -} -export {last as back}; - - -/** - * Get values from middle. - * @param x an array - * @param i begin index - * @param n number of values [1] - * @returns x[i..i+n] - */ -export function middle(x: T[], i: number, n: number=1): T[] { - var i = index(x, i); - var n = Math.max(n, 0); - return x.slice(i, i+n); -} - - -/** - * Get part of an array. - * @param x an array - * @param i begin index [0] - * @param I end index [|x|] - * @returns x[i..I] - */ -export function slice(x: T[], i: number=0, I: number=x.length): T[] { - return x.slice(i, I); -} - - -/** - * Get part of an array! - * @param x an array (updated!) - * @param i begin index [0] - * @param I end index [|x|] - * @returns x = x[i..I] - */ -export function slice$(x: T[], i: number=0, I: number=x.length): T[] { - x.copyWithin(0, i, I); - x.length = length(x, i, I); - return x; -} -// #endregion - - - - -// #region SEARCH VALUE -// -------------------- - -/** - * Check if array has a value. - * @param x an array - * @param v search value - * @param i begin index [0] - * @returns v ∈ x[i..]? - */ -export function includes(x: T[], v: T, i: number=0): boolean { - return x.includes(v, i); -} - - -/** - * Examine if array has a value. - * @param x an array - * @param v search value - * @param fc compare function (a, b) - * @param fm map function (v, i, x) - * @returns v ∈ x? - */ -export function hasValue(x: T[], v: T, fc: CompareFunction | null=null, fm: MapFunction | null=null): boolean { - return searchValue(x, v, fc, fm) >= 0; -} - - -/** - * Find first index of a value. - * @param x an array - * @param v search value - * @param fc compare function (a, b) - * @param fm map function (v, i, x) - * @returns first index of value, -1 if not found - */ -export function searchValue(x: T[], v: T, fc: CompareFunction | null=null, fm: MapFunction | null=null): number { - var fc = fc || COMPARE; - var fm = fm || IDENTITY; - var w = fm(v, 0, null), i = -1; - for (var vx of x) { - var wx = fm(vx, ++i, x); - if (fc(wx, w)===0) return i; - } - return -1; -} - - -/** - * Find last index of a value. - * @param x an array - * @param v search value - * @param fc compare function (a, b) - * @param fm map function (v, i, x) - * @returns last index of value, -1 if not found - */ -export function searchValueRight(x: T[], v: T, fc: CompareFunction | null=null, fm: MapFunction | null=null): number { - var fc = fc || COMPARE; - var fm = fm || IDENTITY; - var w = fm(v, 0, null); - for (var i=x.length-1; i>=0; --i) { - var wx = fm(x[i], i, x); - if (fc(wx, w)===0) return i; - } - return -1; -} - - -/** - * Find indices of value. - * @param x an array - * @param v search value - * @param fc compare function (a, b) - * @param fm map function (v, i, x) - * @returns indices of value - */ -export function searchValueAll(x: T[], v: T, fc: CompareFunction | null=null, fm: MapFunction | null=null): number[] { - var fc = fc || COMPARE; - var fm = fm || IDENTITY; - var w = fm(v, 0, null); - var i = -1, a = []; - for (var vx of x) { - var wx = fm(vx, ++i, x); - if (fc(wx, w)===0) a.push(i); - } - return a; -} - - -/** - * Find first index of an adjacent duplicate value. - * @param x an array - * @param fc compare function (a, b) - * @param fm map function (v, i, x) - * @returns index of first adjacent duplicate value, -1 if none - */ -export function searchAdjacentDuplicateValue(x: T[], fc: CompareFunction | null=null, fm: MapFunction | null=null): number { - var fc = fc || COMPARE; - var fm = fm || IDENTITY; - var X = x.length; - if (X<=1) return -1; - var w0 = fm(x[0], 0, x); - for (var i=1; i(x: T[], y: T[], fc: CompareFunction | null=null, fm: MapFunction | null=null): number { - var fc = fc || COMPARE; - var fm = fm || IDENTITY; - var X = x.length; - var Y = y.length; - for (var i=0, I=Math.min(X, Y); i(x: T[], y: T[], fc: CompareFunction | null=null, fm: MapFunction | null=null): boolean { - var Y = y.length; - return Y===0 || compare(x.slice(0, Y), y, fc, fm)===0; -} -export {hasPrefix as startsWith}; - - -/** - * Examine if array ends with a suffix. - * @param x an array - * @param y search suffix - * @param fc compare function (a, b) - * @param fm map function (v, i, x) - * @returns x[|x|-|y|..] = y? - */ -export function hasSuffix(x: T[], y: T[], fc: CompareFunction | null=null, fm: MapFunction | null=null): boolean { - var Y = y.length; - return Y===0 || compare(x.slice(-Y), y, fc, fm)===0; -} -export {hasSuffix as endsWith}; - - -/** - * Examine if array contains an infix. - * @param x an array - * @param y search infix - * @param fc compare function (a, b) - * @param fm map function (v, i, x) - * @returns x[i..I] = y for some i, I? - */ -export function hasInfix(x: T[], y: T[], fc: CompareFunction | null=null, fm: MapFunction | null=null): boolean { - return searchInfix(x, y, fc, fm) >= 0; -} - - -/** - * Examine if array has a subsequence. - * @param x an array - * @param y search subsequence - * @param fc compare function (a, b) - * @param fm map function (v, i, x) - * @returns x[i₀] ⧺ x[i₁] ⧺ ... = y, for some i₀, i₁, ...? | i₀ < i₁ < ... - */ -export function hasSubsequence(x: T[], y: T[], fc: CompareFunction | null=null, fm: MapFunction | null=null): boolean { - return searchSubsequence(x, y, fc, fm) >= 0; -} - - -/** - * Examine if array has a permutation. - * @param x an array - * @param y search permutation - * @param fc map function (v, i, x) - * @param fm compare function (a, b) - * @returns x contains a shuffled version of y? - */ -export function hasPermutation(x: T[], y: T[], fc: CompareFunction | null=null, fm: MapFunction | null=null): boolean { - var x1 = fm? x.map(fm) : x.slice(); - var y1 = fm? y.map(fm) : y.slice(); - return hasSubsequence(x1.sort(), y1.sort(), fc, fm); -} - - -/** - * Obtain all possible prefixes. - * @param x an array - * @param n number of values [-1 ⇒ any] - * @returns [[], x[..1], x[..2], ...] if n<0; [x[..n]] otherwise - */ -export function prefixes(x: T[], n: number=-1): T[][] { - return [...iprefixes(x, n)]; -} - - -/** - * List all possible prefixes. - * @param x an array - * @param n number of values [-1 ⇒ any] - * @returns [], x[..1], x[..2], ... if n<0; x[..n] otherwise - */ -export function* iprefixes(x: T[], n: number=-1): IterableIterator { - var X = x.length; - if (n>X) return; - if (n>=0) { yield x.slice(0, n); return; } - for (var i=0; i<=X; ++i) - yield x.slice(0, i); -} - - -/** - * Obtain all possible suffixes. - * @param x an array - * @param n number of values [-1 ⇒ any] - * @returns [x[0..], x[1..], x[2..], ...] if n<0; [x[-n..]] otherwise - */ -export function suffixes(x: T[], n: number=-1): T[][] { - return [...isuffixes(x, n)]; -} - - -/** - * List all possible suffixes. - * @param x an array - * @param n number of values [-1 ⇒ any] - * @returns x[0..], x[1..], x[2..], ... if n<0; x[-n..] otherwise - */ -export function* isuffixes(x: T[], n: number=-1): IterableIterator { - var X = x.length; - if (n>X) return; - if (n>=0) { yield x.slice(x.length - n); return; } - for (var i=0; i<=X; ++i) - yield x.slice(i); -} - - -/** - * Obtain all possible infixes. - * @param x an array - * @param n number of values [-1 ⇒ any] - * @returns [[], x[0..1], x[0..2], ..., x[1..2], ...] if n<0; [only of length n] otherwise - */ -export function infixes(x: T[], n: number=-1): T[][] { - return [...iinfixes(x, n)]; -} - - -/** - * List all possible infixes. - * @param x an array - * @param n number of values [-1 ⇒ any] - * @returns [], x[0..1], x[0..2], ..., x[1..2], ... if n<0; only of length n otherwise - */ -export function iinfixes(x: T[], n: number=-1): IterableIterator { - if (n>=0) return infixesFixed(x, n); - else return infixesAll(x); -} - -function* infixesFixed(x: T[], n: number): IterableIterator { - var X = x.length; - if (n>X) return; - if (n===0) { yield []; return; } - for (var i=0, I=X-n+1; i(x: T[]): IterableIterator { - var X = x.length; yield []; - for (var i=0; i(x: T[], n: number=-1): T[][] { - return [...isubsequences(x, n)]; -} - - -/** - * List all possible subsequences. - * @param x an array - * @param n number of values [-1 ⇒ any] - * @returns elements selected by bit from 0..2^|x| if n<0; only of length n otherwise - */ -export function* isubsequences(x: T[], n: number=-1): IterableIterator { - var X = x.length; - if (n>X) return; - if (n===X) { yield x; return; } - if (n===0 || X===0) { yield []; return; } - var y = x.slice(0, -1); - yield* isubsequences(y, n); - for (var s of isubsequences(y, n-1)) { - s.push(x[X-1]); - yield s; - } -} - - -/** - * Obtain all possible permutations. - * @param x an array - * @param n number of values [-1 ⇒ any] - * @returns [[], arrangements of length 1, of length 2, ...] if n<0; [only of length n] otherwise - */ -export function permutations(x: T[], n: number=-1): T[][] { - return [...ipermutations(x, n)]; -} - - -/** - * List all possible permutations. - * @param x an array - * @param n number of values [-1 ⇒ any] - * @returns [], arrangements of length 1, of length 2, ... if n<0; only of length n otherwise - */ -export function* ipermutations(x: T[], n: number=-1): IterableIterator { - var X = x.length; - if (n>X) return; - var i = n<0? 0 : n; - var I = n<0? X : n - for (; i<=I; ++i) - yield* ipermutationsFixed(x, i); -} - -function* ipermutationsFixed(x: T[], n: number): IterableIterator { - var X = x.length; - if (X===0 || n===0) { yield []; return; } - for (var i=0; i(x: T[], y: T[], fc: CompareFunction | null=null, fm: MapFunction | null=null): number { - var fc = fc || COMPARE; - var fm = fm || IDENTITY; - var X = x.length, Y = y.length; - for (var i=0; i<=X-Y; ++i) - if (isInfixAt(x, y, i, fc, fm)) return i; - return -1; -} - - -/** - * Find last index of an infix. - * @param x an array - * @param y search infix - * @param fc compare function (a, b) - * @param fm map function (v, i, x) - * @returns first i | x[i..i+|y|] = y else -1 - */ -export function searchInfixRight(x: T[], y: T[], fc: CompareFunction | null=null, fm: MapFunction | null=null): number { - var fc = fc || COMPARE; - var fm = fm || IDENTITY; - var X = x.length, Y = y.length; - for (var i=X-Y; i>=0; --i) - if (isInfixAt(x, y, i, fc, fm)) return i; - return -1; -} - - -/** - * Find indices of an infix. - * @param x an array - * @param y search infix - * @param fc compare function (a, b) - * @param fm map function (v, i, x) - * @returns i₀, i₁, ... | x[j..j+|y|] = y; j ∈ [i₀, i₁, ...] - */ -export function searchInfixAll(x: T[], y: T[], fc: CompareFunction | null=null, fm: MapFunction | null=null): number[] { - var fc = fc || COMPARE; - var fm = fm || IDENTITY; - var X = x.length, Y = y.length, a = []; - for (var i=0; i<=X-Y; ++i) - if (isInfixAt(x, y, i, fc, fm)) a.push(i); - return a; -} - - -function isInfixAt(x: T[], y: T[], i: number, fc: CompareFunction, fm: MapFunction): boolean { - var Y = y.length; - for (var j=0; j(x: T[], y: T[], fc: CompareFunction | null=null, fm: MapFunction | null=null): number { - var fc = fc || COMPARE; - var fm = fm || IDENTITY; - var y1 = [...y].map(fm), Y = y1.length; - var a = -1, i = -1, j = 0; - for (var vx of x) { - var wx = fm(vx, ++i, x); - if (fc(wx, y1[j])!==0) continue; - if (a<0) a = i; - if (++j>=Y) return a; - } - return -1; -} -// #endregion - - - - -// #region RANDOM ARRANGEMENTS -// --------------------------- - -/** - * Pick an arbitrary value. - * @param x an array - * @param fr random number generator ([0, 1)) - * @returns x[i] | i ∈ 0..|x| - */ -export function randomValue(x: T[], fr: ReadFunction | null=Math.random): T { - var i = Math.floor(fr() * x.length); - return x[i]; -} -export {randomValue as value}; // DEPRECATED - - -/** - * Pick an arbitrary prefix. - * @param x an array - * @param n number of values [-1 ⇒ any] - * @param fr random number generator ([0, 1)) - * @returns x[..i] if n<0; x[..n] otherwise | i ∈ 0..|x| - */ -export function randomPrefix(x: T[], n: number=-1, fr: ReadFunction | null=Math.random): T[] { - var X = x.length; - if (n>X) return null; - var n = n>=0? n : Math.floor((X+1)*fr()); - return x.slice(0, n); -} -export {randomPrefix as prefix}; // DEPRECATED - - -/** - * Pick an arbitrary suffix. - * @param x an array - * @param n number of values [-1 ⇒ any] - * @param fr random number generator ([0, 1)) - * @returns x[|x|-i..] if n<0; x[|x|-n..] otherwise | i ∈ 0..|x| - */ -export function randomSuffix(x: T[], n: number=-1, fr: ReadFunction | null=Math.random): T[] { - var X = x.length; - if (n>X) return null; - var n = n>=0? n : Math.floor((X+1)*fr()); - return x.slice(X-n); -} -export {randomSuffix as suffix}; // DEPRECATED - - -/** - * Pick an arbitrary infix. - * @param x an array - * @param n number of values [-1 ⇒ any] - * @param fr random number generator ([0, 1)) - * @returns x[i..j] if n<0; x[i..i+n] otherwise | i, j ∈ 0..|x| - */ -export function randomInfix(x: T[], n: number=-1, fr: ReadFunction | null=Math.random): T[] { - var X = x.length; - if (n>X) return null; - var n = n>=0? n : randomInfixLength(X, fr()); - var i = Math.floor((X+1-n)*fr()); - return x.slice(i, i+n); -} -export {randomInfix as infix}; // DEPRECATED - -// Not all infix lengths are equally proable. -function randomInfixLength(X: number, r: number): number { - var C = 0.5 * X*(X+1) + 1; - var n = 0.5 * Math.sqrt(1 + 8*r*C) - 0.5; - return X+1 - Math.floor(n+1); -} - - -/** - * Pick an arbitrary subsequence. - * @param x an array - * @param n number of values [-1 ⇒ any] - * @param fr random number generator ([0, 1)) - * @returns x[i, j, ...] | [i, j, ...] = is; |is| = |x| if n<0 else n - */ -export function randomSubsequence(x: T[], n: number=-1, fr: ReadFunction | null=Math.random): T[] { - var X = x.length; - if (n>X) return null; - if (n>=0) return randomSubsequenceFixed(x, n, fr); - else return randomSubsequenceAll(x, fr); -} -export {randomSubsequence as subsequence}; // DEPRECATED - -function randomSubsequenceFixed(x: T[], n: number, fr: ReadFunction): T[] { - var is = fromRange(0, x.length); - randomPermutation$(is, n, fr).sort(); - return getAll(x, is); -} - -function randomSubsequenceAll(x: T[], fr: ReadFunction): T[] { - var a = []; - for (var v of x) - if (fr()<0.5) a.push(v); - return a; -} - - -/** - * Pick an arbitrary permutation. - * @param x an array - * @param n number of values [-1 ⇒ any] - * @param fr random number generator ([0, 1)) - * @returns x' | x' = x; values are randomly shuffled - */ -export function randomPermutation(x: T[], n: number=-1, fr: ReadFunction | null=Math.random): T[] { - var X = x.length; - if (n>X) return null; - return randomPermutation$(x.slice(), n, fr); -} -export {randomPermutation as permutation}; // DEPRECATED - - -/** - * Pick an arbitrary permutation! - * @param x an array (updated!) - * @param n number of values [-1 ⇒ any] - * @param fr random number generator ([0, 1)) - * @returns x | values are randomly shuffled - */ -export function randomPermutation$(x: T[], n: number=-1, fr: ReadFunction | null=Math.random): T[] { - var X = x.length; - if (n>X) return x; - var n = n>=0? n : Math.floor((X+1)*fr()); - for (var i=0; i(x: T[], ft: TestFunction): T { - return x.find(ft); -} - - -/** - * Find last value passing a test. - * @param x an array - * @param ft test function (v, i, x) - * @returns last v | ft(v) = true; v ∈ x - */ -export function findRight(x: T[], ft: TestFunction): T { - for (var i=x.length-1; i>=0; --i) - if (ft(x[i], i, x)) return x[i]; -} -// #endregion - - - - -// #region TAKE/DROP -// ----------------- - -/** - * Keep first n values only. - * @param x an array - * @param n number of values [1] - * @returns x[0..n] - */ -export function take(x: T[], n: number=1): T[] { - var n = Math.max(n, 0); - return x.slice(0, n); -} -export {take as left}; - - -/** - * Keep last n values only. - * @param x an array - * @param n number of values [1] - * @returns x[0..n] - */ -export function takeRight(x: T[], n: number=1): T[] { - var X = x.length; - var n = Math.min(Math.max(n, 0), X); - return x.slice(X-n); -} -export {takeRight as right}; - - -/** - * Keep values from left, while a test passes. - * @param x an array - * @param ft test function (v, i, x) - * @returns x[0..T-1] | ft(x[i]) = true ∀ i ∈ [0, T-1] & ft(x[T]) = false - */ -export function takeWhile(x: T[], ft: TestFunction): T[] { - return x.slice(0, scanWhile(x, ft)); -} - - -/** - * Keep values from right, while a test passes. - * @param x an array - * @param ft test function (v, i, x) - * @returns x[T..] | ft(x[i]) = true ∀ i ∈ [T, |x|-1] & ft(x[T-1]) = false - */ -export function takeWhileRight(x: T[], ft: TestFunction): T[] { - return x.slice(scanWhileRight(x, ft)); -} - - -/** - * Discard first n values only. - * @param x an array - * @param n number of values [1] - * @returns x[n..] - */ -export function drop(x: T[], n: number=1): T[] { - var n = Math.max(n, 0); - return x.slice(n); -} - - -/** - * Discard last n values only. - * @param x an array - * @param n number of values [1] - * @returns x[0..-n] - */ -export function dropRight(x: T[], n: number=1): T[] { - var X = x.length; - var n = Math.min(Math.max(n, 0), X); - return x.slice(0, X-n); -} - - -/** - * Discard values from left, while a test passes. - * @param x an array - * @param ft test function (v, i, x) - * @returns x[T..] | ft(x[i]) = true ∀ i ∈ [0, T-1] & ft(x[T]) = false - */ -export function dropWhile(x: T[], ft: TestFunction): T[] { - return x.slice(scanWhile(x, ft)); -} - - -/** - * Discard values from right, while a test passes. - * @param x an array - * @param ft test function (v, i, x) - * @returns x[0..T-1] | ft(x[i]) = true ∀ i ∈ [T, |x|-1] & ft(x[T-1]) = false - */ -export function dropWhileRight(x: T[], ft: TestFunction): T[] { - return x.slice(0, scanWhileRight(x, ft)); -} -// #endregion - - - - -// #region SCAN -// ------------ - -/** - * Scan from left, while a test passes. - * @param x an array - * @param ft test function (v, i, x) - * @returns first index where test fails - */ -export function scanWhile(x: T[], ft: TestFunction): number { - var i = -1; - for (var v of x) - if (!ft(v, ++i, x)) return i; - return ++i; -} - - -/** - * Scan from right, while a test passes. - * @param x an array - * @param ft test function (v, i, x) - * @returns first index where test passes till end - */ -export function scanWhileRight(x: T[], ft: TestFunction): number { - for (var i=x.length-1; i>=0; --i) - if (!ft(x[i], i, x)) break; - return ++i; -} - - -/** - * Scan from left, until a test passes. - * @param x an array - * @param ft test function (v, i, x) - * @returns first index where test passes - */ -export function scanUntil(x: T[], ft: TestFunction): number { - var i = -1; - for (var v of x) - if (ft(v, ++i, x)) return i; - return ++i; -} - - -/** - * Scan from right, until a test passes. - * @param x an array - * @param ft test function (v, i, x) - * @returns first index where test fails till end - */ -export function scanUntilRight(x: T[], ft: TestFunction): number { - for (var i=x.length-1; i>=0; --i) - if (ft(x[i], i, x)) break; - return ++i; -} -// #endregion - - - - -// #region SEARCH -// -------------- - -/** - * Find first index of a value. - * @param x an array - * @param v search value - * @param i begin index [0] - * @returns index of v in x[i..] if found else -1 - */ -export function indexOf(x: T[], v: T, i: number=0): number { - return x.indexOf(v, i); -} - - -/** - * Find last index of a value. - * @param x an array - * @param v search value - * @param i begin index [|x|-1] - * @returns last index of v in x[0..i] if found else -1 - */ -export function lastIndexOf(x: T[], v: T, i: number=x.length-1) { - return x.lastIndexOf(v, i); -} - - -/** - * Find index of first value passing a test. - * @param x an array - * @param ft test function (v, i, x) - * @returns first index of value, -1 if not found - */ -export function search(x: T[], ft: TestFunction): number { - return x.findIndex(ft); -} -export {search as findIndex}; - - -/** - * Find index of last value passing a test. - * @param x an array - * @param ft test function (v, i, x) - * @returns last index of value, -1 if not found - */ -export function searchRight(x: T[], ft: TestFunction): number { - for (var i=x.length-1; i>=0; --i) - if (ft(x[i], i, x)) return i; - return -1; -} -export {searchRight as findLastIndex}; - - -/** - * Find indices of values passing a test. - * @param x an array - * @param ft test function (v, i, x) - * @returns indices of value - */ -export function searchAll(x: T[], ft: TestFunction): number[] { - var i = -1, a = []; - for (var v of x) - if (ft(v, ++i, x)) a.push(i); - return a; -} -// #endregion - - - - -// #region FUNCTIONAL -// ------------------ - -/** - * Call a function for each value. - * @param x an array - * @param fp process function (v, i, x) - */ -export function forEach(x: T[], fp: ProcessFunction): void { - x.forEach(fp); -} - - -/** - * Examine if any value satisfies a test. - * @param x an array - * @param ft test function (v, i, x) - * @returns true if ft(vᵢ) = true for some vᵢ ∈ x - */ -export function some(x: T[], ft: TestFunction | null=null): boolean { - if (ft) return x.some(ft); - else return someBoolean(x); -} -export {some as anyOf}; - -function someBoolean(x: T[]): boolean { - for (var i=0, I=x.length; i(x: T[], ft: TestFunction | null=null): boolean { - if (ft) return x.every(ft); - else return everyBoolean(x); -} -export {every as allOf}; - -function everyBoolean(x: T[]): boolean { - for (var i=0, I=x.length; i(x: T[], fm: MapFunction): (T|U)[] { - return x.map(fm); -} - - -/** - * Transform values of an array! - * @param x an array (updated!) - * @param fm map function (v, i, x) - * @returns x = [fm(v₀), fm(v₁), ...]; vᵢ ∈ x - */ -export function map$(x: T[], fm: MapFunction): T[] { - for (var i=0, I=x.length; i(x: T[], fr: ReduceFunction, acc?: T|U): T|U { - var init = arguments.length <= 2; - return init? x.reduce(fr as any) : x.reduce(fr, acc); -} - - -/** - * Reduce values from right, to a single value. - * @param x an array - * @param fr reduce function (acc, v, i, x) - * @param acc initial value - * @returns fr(fr(acc, vₓ₋₀), vₓ₋₁)... | fr(acc, vₓ₋₀) = vₓ₋₀ if acc not given - */ -export function reduceRight(x: T[], fr: ReduceFunction, acc?: T|U): T|U { - var init = arguments.length <= 2; - for (var i=x.length-1; i>=0; --i) { - if (init) { acc = x[i]; init = false; } - else acc = fr(acc, x[i], i, x); - } - return acc; -} - - -/** - * Keep values which pass a test. - * @param x an array - * @param ft test function (v, i, x) - * @returns [v₀, v₁, ...] | ft(vᵢ) = true; vᵢ ∈ x - */ -export function filter(x: T[], ft: TestFunction): T[] { - return x.filter(ft); -} -export {filter as findAll}; - - -/** - * Keep values which pass a test! - * @param x an array (updated!) - * @param ft test function (v, i, x) - * @returns x = [v₀, v₁, ...] | ft(vᵢ) = true; vᵢ ∈ x - */ -export function filter$(x: T[], ft: TestFunction): T[] { - for (var i=0, j=0, I=x.length; i(x: T[], is: number[]): T[] { - var X = x.length, a = []; - for (var i of is) - if (i>=0 && i(x: T[], ft: TestFunction): T[] { - var i = -1, a = []; - for (var v of x) - if (!ft(v, ++i, x)) a.push(v); - return a; -} - - -/** - * Discard values which pass a test! - * @param x an array (updated!) - * @param ft test function (v, i, x) - * @returns x = [v₀, v₁, ...] | ft(vᵢ) = false; vᵢ ∈ x - */ -export function reject$(x: T[], ft: TestFunction): T[] { - for (var i=0, j=0, I=x.length; i(x: T[], is: number[]): T[] { - var i = -1, a = []; - for (var v of x) - if (!is.includes(++i)) a.push(v); - return a; -} -// #endregion - - - - -// #region FLATTEN -// --------------- - -/** - * Flatten nested array to given depth. - * @param x a nested array - * @param n maximum depth [-1 ⇒ all] - * @param fm map function (v, i, x) - * @param ft flatten test function (v, i, x) [is] - * @returns flat iterable - */ -export function flat(x: any[], n: number=-1, fm: MapFunction | null=null, ft: TestFunction | null=null): any[] { - var fm = fm || IDENTITY; - var ft = ft || is; - return flatTo$([], x, n, fm, ft); -} - -function flatTo$(a: any[], x: any[], n: number, fm: MapFunction, ft: TestFunction): any[] { - var i = -1; - for (var v of x) { - var w = fm(v, ++i, x); - if (n!==0 && ft(w, i, x)) flatTo$(a, v, n-1, fm, ft); - else a.push(w); - } - return a; -} - - -/** - * Flatten nested array, based on map function. - * @param x an array - * @param fm map function (v, i, x) - * @param ft flatten test function (v, i, x) [is] - * @returns flat iterable - */ -export function flatMap(x: any[], fm: MapFunction | null=null, ft: TestFunction | null=null): any[] { - var fm = fm || IDENTITY; - var ft = ft || is; - var i = -1, a = []; - for (var v of x) { - var w = fm(v, ++i, x); - if (ft(w, i, x)) concat$(a, w); - else a.push(w); - } - return a; -} -// #endregion - - - - -// #region PREFIX SUM -// ------------------ - -/** - * Perform exclusive prefix scan from left to right. - * @param x an array - * @param fr reduce function (acc, v, i, x) - * @param acc initial value - * @returns [acc, fr(acc, v₀), fr(fr(acc, v₀), v₁)...] - */ -export function exclusiveScan(x: T[], fr: ReduceFunction, acc: T|U): (T|U)[] { - var a = []; - for (var i=0, I=x.length; i(x: T[], fr: ReduceFunction, acc: T): T[] { - for (var i=0, I=x.length; i(x: T[], fr: ReduceFunction, acc?: T|U): (T|U)[] { - var init = arguments.length <= 2, a = []; - for (var i=0, I=x.length; i(x: T[], fr: ReduceFunction, acc: T): T[] { - for (var i=0, I=x.length; i(x: T[], fc: CombineFunction, acc: T): T[] { - var a = []; - if (x.length>0) a.push(fc(acc, x[0])); - for (var i=1, I=x.length; i(x: T[], fc: CombineFunction, acc: T): T[] { - var X = x.length; - if (X===0) return x; - var v = x[0]; - x[0] = fc(acc, v); - for (var i=1; i(x: T[], v: T): T[] { - var a = [], i = -1; - for (var u of x) { - if (++i>0) a.push(v); - a.push(u); - } - return a; -} - - -/** - * Estimate new values between existing ones. - * @param x an array - * @param fc combine function (a, b) - * @returns [x[0], fc(x[0], x[1]), x[1], fc(x[1], x[2]), ..., x[|x|-1]] - */ -export function interpolate(x: T[], fc: CombineFunction): T[] { - var a = [], u: T, i = -1; - for (var v of x) { - if (++i>0) a.push(fc(u, v)); - a.push(u = v); - } - return a; -} - - -/** - * Place values of an array between another. - * @param x an array - * @param y another array - * @param m number of values from x [1] - * @param n number of values from y [1] - * @param s step size for x [m] - * @param t step size for y [n] - * @returns x[0..m] ⧺ y[0..n] ⧺ x[s..s+m] ⧺ y[t..t+n] ⧺ ... ⧺ x[k*s..|x|-1] | k ∈ W - */ -export function intermix(x: T[], y: T[], m: number=1, n: number=1, s: number=m, t: number=n): T[] { - var X = x.length, Y = y.length, a = []; - var m = Math.max(m, 0); - var n = Math.max(n, 0); - var s = Math.max(s, 1); - var t = Math.max(t, 1); - for (var i=0, j=0; i0) { - for (var k=j, K=k+n; k(xs: T[][]): T[] { - var a = []; - for (var i=0;; ++i) { - var n = 0; - for (var x of xs) - if (i(xs: T[][], fm: MapFunction | null=null, fe: EndFunction=null, vd?: T): (T[]|U)[] { - var fm = fm || IDENTITY; - var fe = fe || some as EndFunction; - var X = xs.length, a = []; - if (X===0) return a; - var ds = new Array(X).fill(false); - var ls = xs.map(x => x.length); - for (var i=0;; ++i) { - for (var j=0, vs=[]; j=ls[j]; - vs[j] = ds[j]? vd : xs[j][i]; - } - if (fe(ds)) break; - a.push(fm(vs, i, null)); - } - return a; -} - - -// TODO: zip2()? -// #endregion - - - - -// #region MANIPULATION -// -------------------- - -/** - * Fill with given value. - * @param x an array - * @param v value - * @param i begin index [0] - * @param I end index [|x|] - * @returns x' | x' = x; x'[i..I] = v - */ -export function fill(x: T[], v: T, i: number=0, I: number=x.length): T[] { - return x.slice().fill(v, i, I); -} - - -/** - * Fill with given value! - * @param x an array (updated!) - * @param v value - * @param i begin index [0] - * @param I end index [|x|] - * @returns x | x[i..I] = v - */ -export function fill$(x: T[], v: T, i: number=0, I: number=x.length): T[] { - return x.fill(v, i, I); -} - - -/** - * Add value to the end. - * @param x an array - * @param vs values to add - * @returns x ⧺ vs - */ -export function push(x: T[], ...vs: T[]): T[] { - return x.concat(vs); -} -export {push as pushBack}; -export {push as append}; - - -/** - * Add values to the end! - * @param x an array (updated!) - * @param vs values to add - * @returns x = x ⧺ vs - */ -export function push$(x: T[], ...vs: T[]): T[] { - x.push(...vs); - return x; -} -export {push$ as pushBack$}; -export {push$ as append$}; - - -/** - * Remove last value. - * @param x an array - * @returns x[0..|x|-1] - */ -export function pop(x: T[]): T[] { - return x.slice(0, -1); -} -export {pop as popBack}; - - -/** - * Remove last value! - * @param x an array (updated!) - * @returns x = x[0..|x|-1] - */ -export function pop$(x: T[]): T[] { - x.pop(); - return x; -} -export {pop as popBack$}; - - -/** - * Remove first value. - * @param x an array - * @returns x[1..] - */ -export function shift(x: T[]): T[] { - return x.slice(1); -} -export {shift as popFront}; - - -/** - * Remove first value! - * @param x an array (updated!) - * @returns x = x[1..] - */ -export function shift$(x: T[]): T[] { - x.shift(); - return x; -} -export {shift$ as popFront$}; - - -/** - * Add values to the start. - * @param x an array - * @param vs values to add - * @returns vs ⧺ x - */ -export function unshift(x: Iterable, ...vs: T[]): T[] { - return concat$(vs, x); -} -export {unshift as pushFront}; -export {unshift as prepend}; - - -/** - * Add values to the start! - * @param x an array (updated!) - * @param vs values to add - * @returns x = vs ⧺ x - */ -export function unshift$(x: T[], ...vs: T[]): T[] { - x.unshift(...vs); - return x; -} -export {unshift$ as pushFront$}; -export {unshift$ as prepend$}; - - -/** - * Copy part of array to another. - * @param x target array - * @param y source array - * @param j write index [0] - * @param i read begin index [0] - * @param I read end index [|x|] - * @returns x[0..j] ⧺ y[i..I] ⧺ x[j+I-i..] - */ -export function copy(x: T[], y: T[], j: number=0, i: number=0, I: number=y.length): T[] { - return copy$(x.slice(), y, j, i, I); -} - - -/** - * Copy part of array to another! - * @param x target array (updated!) - * @param y source array - * @param j write index [0] - * @param i read begin index [0] - * @param I read end index [|x|] - * @returns x = x[0..j] ⧺ y[i..I] ⧺ x[j+I-i..] - */ -export function copy$(x: T[], y: T[], j: number=0, i: number=0, I: number=y.length): T[] { - var j = index(x, j); - var [i, I] = indexRange(y, i, I); - for (; i(x: T[], j: number=0, i: number=0, I: number=x.length): T[] { - return x.slice().copyWithin(j, i, I); -} - - -/** - * Copy part of array within! - * @param x an array (updated!) - * @param j write index [0] - * @param i read begin index [0] - * @param I read end index [|x|] - * @returns x = x[0..j] ⧺ x[i..I] ⧺ x[j+I-i..] - */ -export function copyWithin$(x: T[], j: number=0, i: number=0, I: number=x.length): T[] { - return x.copyWithin(j, i, I); -} - - -/** - * Move part of array within. - * @param x an array - * @param j write index [0] - * @param i read begin index [0] - * @param I read end index [|x|] - * @returns x[0..j] ⧺ x[i..I] ⧺ x[j..i] ⧺ x[I..] - */ -export function moveWithin(x: T[], j: number=0, i: number=0, I: number=x.length): T[] { - var j = index(x, j); - var [i, I] = indexRange(x, i, I); - if (j(x: T[], i: number, j: number, k: number): T[] { - return x.slice(0, i).concat( - x.slice(j, k), - x.slice(i, j), - x.slice(k) - ); -} - - -/** - * Move part of array within! - * @param x an array (updated!) - * @param j write ±index [0] - * @param i read begin ±index [0] - * @param I read end ±index [|x|] - * @returns x = x[0..j] ⧺ x[i..I] ⧺ x[j..i] ⧺ x[I..] - */ -export function moveWithin$(x: T[], j: number=0, i: number=0, I: number=x.length): T[] { - var j = index(x, j); - var [i, I] = indexRange(x, i, I); - var p = x.slice(i, I), P = p.length; - if (j(x: T[], i: number, n: number=x.length, ...vs: T[]): T[] { - var i = index(x, i); - var n = Math.max(n, 0); - return concat$(x.slice(0, i), vs, x.slice(i+n)); -} -export {splice as toSpliced}; - - -/** - * Remove or replace existing values! - * @param x an array (updated!) - * @param i remove ±index - * @param n number of values to remove [rest] - * @param vs values to insert - * @returns x = x[0..i] ⧺ vs ⧺ x[i+n..] - */ -export function splice$(x: T[], i: number, n: number=x.length, ...vs: T[]): T[] { - x.splice(i, n, ...vs); - return x; -} -// #endregion - - - - -// #region COUNT/PARTITION -// ----------------------- - -/** - * Count values which satisfy a test. - * @param x an array - * @param ft test function (v, i, x) - * @returns Σtᵢ | tᵢ = 1 if ft(vᵢ) else 0; vᵢ ∈ x - */ -export function count(x: T[], ft: TestFunction): number { - var i = -1, a = 0; - for (var v of x) - if (ft(v, ++i, x)) ++a; - return a; -} - - -/** - * Count occurrences of each distinct value. - * @param x an array - * @param fm map function (v, i, x) - * @returns Map \{value ⇒ count\} - */ -export function countEach(x: T[], fm: MapFunction | null=null): Map { - var fm = fm || IDENTITY; - var i = -1, a = new Map(); - for (var v of x) { - var w = fm(v, ++i, x); - a.set(w, (a.get(w) || 0) + 1); - } - return a; -} -export {countEach as countAs}; // DEPRECATED - - -/** - * Segregate values by test result. - * @param x an array - * @param ft test function (v, i, x) - * @returns [satisfies, doesnt] - */ -export function partition(x: T[], ft: TestFunction): [T[], T[]] { - var t: T[] = [], f: T[] = [], i = -1; - for (var v of x) { - if (ft(v, ++i, x)) t.push(v); - else f.push(v); - } - return [t, f]; -} - - -/** - * Segregate each distinct value. - * @param x an array - * @param fm map function (v, i, x) - * @returns Map \{key ⇒ values\} - */ -export function partitionEach(x: T[], fm: MapFunction | null=null): Map { - var fm = fm || IDENTITY; - var i = -1, a = new Map(); - for (var v of x) { - var w = fm(v, ++i, x); - if (!a.has(w)) a.set(w, []); - a.get(w).push(v); - } - return a; -} -export {partitionEach as groupToMap}; -export {partitionEach as partitionAs}; // DEPRECATED -// #endregion - - - - -// #region SPLITS -// -------------- - -/** - * Break array considering test as separator. - * @param x an array - * @param ft test function (v, i, x) - * @returns [x[j..k], x[l..m], ...] | ft(x[i]) = true; i = 0..j / k..l / ... - */ -export function split(x: T[], ft: TestFunction): T[][] { - var i = -1, a = [], b = []; - for (var v of x) { - if (!ft(v, ++i, x)) b.push(v); - else if (b.length) { a.push(b); b = []; } - } - if (b.length) a.push(b); - return a; -} - - -/** - * Break array considering indices as separator. - * @param x an array - * @param is indices (sorted) - * @returns [x[j..k], x[l..m], ...] | ft(x[i]) = true; i = 0..j / k..l / ...; i ∈ is - */ -export function splitAt(x: T[], is: number[]): T[][] { - var i = -1, a = [], b = []; - for (var v of x) { - if (!is.includes(++i)) b.push(v); - else if(b.length) { a.push(b); b = []; } - } - if (b.length) a.push(b); - return a; -} - - -/** - * Break array when test passes. - * @param x an array - * @param ft test function (v, i, x) - * @returns [x[0..j], x[j..k], ...] | ft(x[i]) = true; i = j, k, ... - */ -export function cut(x: T[], ft: TestFunction): T[][] { - var j = 0, a = []; - for (var i=0, I=x.length; i(x: T[], ft: TestFunction): T[][] { - var j = 0, a = []; - for (var i=0, I=x.length; i(x: T[], is: number[]): T[][] { - var X = x.length; - var j = 0, a = []; - for (var i of is) { - var i = i<0? X+i : i; - a.push(x.slice(j, i)); - j = Math.max(j, i); - } - a.push(x.slice(j)); - return a; -} - - -/** - * Break array after given indices. - * @param x an array - * @param is split ±indices (left to right) - * @returns [x[0..j+1], x[j+1..k], ...] | ft(x[i]) = true; i = j, k, ...; i ∈ is - */ -export function cutAtRight(x: T[], is: number[]): T[][] { - var X = x.length; - var j = 0, a = []; - for (var i of is) { - var i = i<0? X+i : i; - a.push(x.slice(j, i+1)); - j = Math.max(j, i+1); - } - a.push(x.slice(j)); - return a; -} - - -/** - * Keep similar values together and in order. - * @param x an array - * @param fc compare function (a, b) - * @param fm map function (v, i, x) - * @returns [x[0..k], x[k..l], ...] | fc(x[i], x[j]) = 0; i, j = 0..k / k..l / ... - */ -export function group(x: T[], fc: CompareFunction | null=null, fm: MapFunction | null=null): T[][] { - var fc = fc || COMPARE; - var fm = fm || IDENTITY; - var a = [], b = []; - var u: T|U, i = -1; - for (var v of x) { - var w = fm(v, ++i, x); - if (i===0 || fc(u, w)===0) b.push(v); - else { a.push(b); b = [v]; } - u = w; - } - a.push(b); - return a; -} - - -/** - * Break array into chunks of given size. - * @param x an array - * @param n chunk size [1] - * @param s chunk step [n] - * @returns x[0..n] ⧺ x[s..s+n] ⧺ x[2s..2s+n] ⧺ ... - */ -export function chunk(x: T[], n: number=1, s: number=n): T[][] { - var a = []; - if (n<0) return a; - var s = Math.max(s, 1); - for (var i=0, I=x.length; i(...xs: T[][]): T[] { - return [].concat(...xs); -} - - -/** - * Append values from arrays! - * @param x an array (updated!) - * @param ys arrays to append - * @returns x = x ⧺ y₀ ⧺ y₁ ⧺ ...] | [y₀, y₁, ...] = ys - */ -export function concat$(x: T[], ...ys: Iterable[]): T[] { - for (var y of ys) - x.push(...y); - return x; -} - - -/** - * Join values together into a string. - * @param x an array - * @param sep separator [,] - * @returns "$\{v₀\}$\{sep\}$\{v₁\}..." | vᵢ ∈ x - */ -export function join(x: T[], sep: string=","): string { - return x.join(sep); -} -// #endregion - - - - -// #region REARRANGE -// ----------------- - -/** - * Obtain values that cycle through array. - * @param x an array - * @param i begin ±index [0] - * @param n number of values [|x|] - */ -export function cycle(x: T[], i: number=0, n: number=x.length): T[] { - var X = x.length; - if (n<=0 || X===0) return []; - var i = mod(i, X); - var a = x.slice(i, i+n); - n -= a.length; - for (var m=0, M=Math.floor(n/X); m(x: T[], n: number=1): T[] { - for (var a=[]; n>0; --n) - concat$(a, x); - return a; -} - - -/** - * Reverse the values. - * @param x an array - * @returns [x[|x|-1], x[|x|-2], ..., x[1], x[0]] - */ -export function reverse(x: T[]): T[] { - return x.slice().reverse(); -} -export {reverse as toReversed}; - - -/** - * Reverse the values! - * @param x an array (updated!) - * @returns x = [x[|x|-1], x[|x|-2], ..., x[1], x[0]] - */ -export function reverse$(x: T[]): T[] { - return x.reverse(); -} - - -/** - * Rotate values in array. - * @param x an array - * @param n rotate amount (+ve: left, -ve: right) [0] - * @returns x[n..] ⧺ x[0..n] - */ -export function rotate(x: T[], n: number=0): T[] { - var n = mod(n, x.length); - return concat$(x.slice(n), x.slice(0, n)); -} - - -/** - * Rotate values in array! - * @param x an array (updated!) - * @param n rotate amount (+ve: left, -ve: right) [0] - * @returns x = x[n..] ⧺ x[0..n] - */ -export function rotate$(x: T[], n: number=0): T[] { - var n = mod(n, x.length); - var y = x.slice(0, n); - x.copyWithin(0, n); - return copy$(x, y, x.length-n); -} -// #endregion - - - - -// #region SET OPERATIONS -// ------------------------ - -/** - * Examine if there are no duplicate values. - * @param x an array - * @param fc compare function (a, b) - * @param fm map function (v, i, x) - * @returns ∀ vᵢ, vⱼ ∈ x, is vᵢ ≠ vⱼ? - */ -export function isUnique(x: T[], fc: CompareFunction | null=null, fm: MapFunction | null=null): boolean { - if (fc) return isUniqueDual(x, fc, fm); - else return isUniqueMap (x, fm); -} - -function isUniqueMap(x: T[], fm: MapFunction | null=null): boolean { - var fm = fm || IDENTITY; - var s = new Set(), i = -1; - for (var v of x) { - var w = fm(v, ++i, x); - if (s.has(w)) return false; - s.add(w); - } - return true; -} - -function isUniqueDual(x: T[], fc: CompareFunction | null=null, fm: MapFunction | null=null): boolean { - var fc = fc || COMPARE; - var fm = fm || IDENTITY; - var x1 = [...x].map(fm); - for (var wx of x1) { - for (var wy of x1) - if (fc(wx, wy)===0) return false; - } - return true; -} - - -/** - * Examine if arrays have no value in common. - * @param x an array - * @param y another array - * @param fc compare function (a, b) - * @param fm map function (v, i, x) - * @returns x ∩ y = Φ? - */ -export function isDisjoint(x: T[], y: T[], fc: CompareFunction | null=null, fm: MapFunction | null=null): boolean { - if (fc) return isDisjointDual(x, y, fc, fm); - else return isDisjointMap (x, y, fm); -} - -function isDisjointMap(x: T[], y: T[], fm: MapFunction | null=null): boolean { - var fm = fm || IDENTITY; - var s = toSet(y, fm), i = -1; - for (var v of x) { - var w = fm(v, ++i, x); - if (s.has(w)) return false; - } - return true; -} - -function isDisjointDual(x: T[], y: T[], fc: CompareFunction | null=null, fm: MapFunction | null=null): boolean { - var fc = fc || COMPARE; - var fm = fm || IDENTITY; - var y1 = [...y].map(fm), i = -1; - for (var vx of x) { - var wx = fm(vx, ++i, x); - for (var wy of y1) - if (fc(wx, wy)===0) return false; - } - return true; -} - - -/** - * Remove duplicate values. - * @param x an array - * @param fc compare function (a, b) - * @param fm map function (v, i, x) - * @returns v₀, v₁, ... | vᵢ ∈ x; vᵢ ≠ vⱼ ∀ i, j - */ -export function unique(x: T[], fc: CompareFunction | null=null, fm: MapFunction | null=null): T[] { - if (fc) return uniqueDual(x, fc, fm); - else return uniqueMap (x, fm); -} - -function uniqueMap(x: T[], fm: MapFunction | null=null): T[] { - var fm = fm || IDENTITY; - var s = new Set(); - var i = -1, a = []; - for (var v of x) { - var w = fm(v, ++i, x); - if (s.has(w)) continue; - s.add(w); a.push(v); - } - return a; -} - -function uniqueDual(x: T[], fc: CompareFunction | null=null, fm: MapFunction | null=null): T[] { - var fc = fc || COMPARE; - var fm = fm || IDENTITY; - var i = -1, s = [], a = []; - x: for (var vx of x) { - var wx = fm(vx, ++i, x); - for (var ws of s) - if (fc(ws, wx)===0) continue x; - s.push(wx); a.push(vx); - } - return a; -} - - -/** - * Obtain values present in any array. - * @param x an array - * @param y another array - * @param fc compare function (a, b) - * @param fm map function (v, i, x) - * @returns x ∪ y = \{v | v ∈ x or v ∈ y\} - */ -export function union(x: T[], y: T[], fc: CompareFunction | null=null, fm: MapFunction | null=null): T[] { - return union$(x.slice(), y, fc, fm); -} - - -/** - * Obtain values present in any array! - * @param x an array (updated!) - * @param y another array - * @param fc compare function (a, b) - * @param fm map function (v, i, x) - * @returns x = x ∪ y = \{v | v ∈ x or v ∈ y\} - */ -export function union$(x: T[], y: T[], fc: CompareFunction | null=null, fm: MapFunction | null=null): T[] { - if (fc) return unionDual$(x, y, fc, fm); - else return unionMap$ (x, y, fm); -} - -function unionMap$(x: T[], y: T[], fm: MapFunction | null=null): T[] { - var fm = fm || IDENTITY; - var s = toSet(x, fm), i = -1; - for (var vy of y) { - var wy = fm(vy, ++i, y); - if (!s.has(wy)) x.push(vy); - } - return x; -} - -function unionDual$(x: T[], y: T[], fc: CompareFunction | null=null, fm: MapFunction | null=null): T[] { - var fc = fc || COMPARE; - var fm = fm || IDENTITY; - var x1 = x.map(fm), i = -1; - y: for (var vy of y) { - var wy = fm(vy, ++i, y); - for (var wx of x1) - if (fc(wx, wy)===0) continue y; - x.push(vy); - } - return x; -} - - -/** - * Obtain values present in both arrays. - * @param x an array - * @param y another array - * @param fc compare function (a, b) - * @param fm map function (v, i, x) - * @returns x ∩ y = \{v | v ∈ x, v ∈ y\} - */ -export function intersection(x: T[], y: T[], fc: CompareFunction | null=null, fm: MapFunction | null=null): T[] { - if (fc) return intersectionDual(x, y, fc, fm); - else return intersectionMap (x, y, fm); -} - -function intersectionMap(x: T[], y: T[], fm: MapFunction | null=null): T[] { - var fm = fm || IDENTITY; - var s = toSet(y, fm); - var i = -1, a = []; - for (var vx of x) { - var wx = fm(vx, ++i, x); - if (s.has(wx)) a.push(vx); - } - return a; -} - -function intersectionDual(x: T[], y: T[], fc: CompareFunction | null=null, fm: MapFunction | null=null): T[] { - var fc = fc || COMPARE; - var fm = fm || IDENTITY; - var y1 = [...y].map(fm); - var i = -1, a = []; - x: for (var vx of x) { - var wx = fm(vx, ++i, x); - for (var wy of y1) - if (fc(wx, wy)===0) { a.push(vx); continue x; } - } - return a; -} - - -/** - * Obtain values not present in another array. - * @param x an array - * @param y another array - * @param fc compare function (a, b) - * @param fm map function (v, i, x) - * @returns x - y = \{v | v ∈ x, v ∉ y\} - */ -export function difference(x: T[], y: T[], fc: CompareFunction | null=null, fm: MapFunction | null=null): T[] { - if (fc) return differenceDual(x, y, fc, fm); - else return differenceMap (x, y, fm); -} - -function differenceMap(x: T[], y: T[], fm: MapFunction | null=null): T[] { - var fm = fm || IDENTITY; - var s = toSet(y, fm); - var i = -1, a = []; - for (var vx of x) { - var wx = fm(vx, ++i, x); - if (!s.has(wx)) a.push(vx); - } - return a; -} - -function differenceDual(x: T[], y: T[], fc: CompareFunction | null=null, fm: MapFunction | null=null): T[] { - var fc = fc || COMPARE; - var fm = fm || IDENTITY; - var y1 = [...y].map(fm); - var i = -1, a = []; - x: for (var vx of x) { - var wx = fm(vx, ++i, x); - for (var wy of y1) - if (fc(wx, wy)===0) continue x; - a.push(vx); - } - return a; -} - - -/** - * Obtain values not present in both arrays. - * @param x an array - * @param y another array - * @param fc compare function (a, b) - * @param fm map function (v, i, x) - * @returns x-y ∪ y-x - */ -export function symmetricDifference(x: T[], y: T[], fc: CompareFunction | null=null, fm: MapFunction | null=null): T[] { - var x0 = fromIterable$(x); - var y0 = fromIterable$(y); - var ax = difference(x0, y0, fc, fm); - var ay = difference(y0, x0, fc, fm); - return concat$(ax, ay); -} - - -/** - * Obtain cartesian product of arrays. - * @param xs arrays - * @param fm map function (vs, i) - * @returns x₀ × x₁ × ... = \{[v₀, v₁, ...] | v₀ ∈ x₀, v₁ ∈ x₁, ...] \} - */ -export function cartesianProduct(xs: T[][], fm: MapFunction | null=null): (T[]|U)[] { - var fm = fm || IDENTITY; - var XS = xs.length, a = []; - if (XS===0) return a; - var is = new Array(XS).fill(0); - var ls = xs.map(x => x.length); - if (ls.some(l => l===0)) return a; - for (var i=0;; ++i) { - for (var j=0, vs=[]; j=0; --r) { - if (++is[r] { - var a = is([1, 2]); - expect(a).toBe(true); - var a = is([]); - expect(a).toBe(true); - var a = is(new Set([1, 2])); - expect(a).toBe(false); -}); - - -test("keys", () => { - var a = keys([1, 2, 3]); - expect([...a]).toStrictEqual([0, 1, 2]); -}); - - -test("values", () => { - var a = values([1, 2, 3]); - expect([...a]).toStrictEqual([1, 2, 3]); -}); - - -test("entries", () => { - var a = entries(["A", "B", "C"]); - expect([...a]).toStrictEqual([[0, "A"], [1, "B"], [2, "C"]]); -}); - - - - -// GENERATE -// -------- - -test("from", () => { - var a = from([1, 2].values()); - expect(a).toStrictEqual([1, 2]); -}); - - -test("from$", () => { - var a = from$([1, 2].values()); - expect(a).toStrictEqual([1, 2]); -}); - - -test("fromRange", () => { - var a = fromRange(0, 4); - expect(a).toStrictEqual([ 0, 1, 2, 3 ]); - var a = fromRange(0, 8, 2); - expect(a).toStrictEqual([0, 2, 4, 6]); -}); - - -test("fromInvocation", () => { - var n = 0; - var a = fromInvocation(() => ++n, 4); - expect(a).toStrictEqual([1, 2, 3, 4]); -}); - - -test("fromApplication", () => { - var a = fromApplication(v => v+2, 2, 4); - expect(a).toStrictEqual([2, 4, 6, 8]); - var a = fromApplication(v => v*2, 2, 4); - expect(a).toStrictEqual([2, 4, 8, 16]); -}); - - - - -// COMPARE -// ------- - -test("compare", () => { - var x = [1, 2]; - var y = [1, 2, 3]; - var a = compare(x, y); - expect(a).toBeLessThan(0); - var y = [1, 2]; - var a = compare(x, y); - expect(a).toBe(0); - var y = [1, -2]; - var a = compare(x, y); - expect(a).toBeGreaterThan(0); - var a = compare(x, y, (a, b) => Math.abs(a) - Math.abs(b)); - expect(a).toBe(0); - var a = compare(x, y, null, v => Math.abs(v)); - expect(a).toBe(0); -}); - - -test("isEqual", () => { - var x = [1, 2]; - var a = isEqual(x, [1, 2]); - expect(a).toBe(true); - var a = isEqual(x, [11, 12]); - expect(a).toBe(false); - var a = isEqual(x, [11, 12], (a, b) => (a % 10) - (b % 10)); - expect(a).toBe(true); - var a = isEqual(x, [11, 12], null, v => v % 10); - expect(a).toBe(true); -}); - - - - -// LENGTH -// ------ - -test("index", () => { - var x = [2, 4, 6, 8]; - var a = index(x, 1); - expect(a).toBe(1); - var a = index(x, -1); - expect(a).toBe(3); - var a = index(x, -10); - expect(a).toBe(0); -}); - - -test("indexRange", () => { - var x = [2, 4, 6, 8]; - var a = indexRange(x, 1); - expect(a).toStrictEqual([1, 4]); - var a = indexRange(x, 1, -1); - expect(a).toStrictEqual([1, 3]); - var a = indexRange(x, 1, -10); - expect(a).toStrictEqual([1, 1]); -}); - - -test("length", () => { - var x = [2, 4, 6, 8]; - var a = length(x); - expect(a).toBe(4); - var a = length(x, 1); - expect(a).toBe(3); - var a = length(x, 1, 3); - expect(a).toBe(2); -}); - - -test("isEmpty", () => { - var x = [1, 2, 3]; - var a = isEmpty(x); - expect(a).toBe(false); - var x: number[] = []; - var a = isEmpty(x); - expect(a).toBe(true); -}); - - - - -// GET/SET -// ------- - -test("get", () => { - var x = [2, 4, 6, 8]; - var a = get(x, 1); - expect(a).toBe(4); - var a = get(x, 3); - expect(a).toBe(8); -}); - - -test("getAll", () => { - var x = [2, 4, 6, 8]; - var a = getAll(x, [1, 2]); - expect(a).toStrictEqual([ 4, 6 ]); - var a = getAll(x, [1, 3]); - expect(a).toStrictEqual([ 4, 8 ]); -}); - - -test("getPath", () => { - var x = [[2, 4], 6, 8]; - var a = getPath(x, [1]); - expect(a).toBe(6); - var a = getPath(x, [0, 1]); - expect(a).toBe(4); - var a = getPath(x, [0, 1, 2]); - expect(a).toBeUndefined(); -}); - - -test("hasPath", () => { - var x = [[2, 4], 6, 8]; - var a = hasPath(x, [1]); - expect(a).toBe(true); - var a = hasPath(x, [0, 1]); - expect(a).toBe(true); - var a = hasPath(x, [0, 1, 2]); - expect(a).toBe(false); -}); - - -test("set", () => { - var x = [2, 4, 6, 8]; - var a = set(x, 1, 40); - expect(a).toStrictEqual([2, 40, 6, 8]); - var a = set(x, 3, 80); - expect(a).toStrictEqual([2, 4, 6, 80]); -}); - - -test("set$", () => { - var x = [2, 4, 6, 8]; - var a = set$(x, 1, 40); - expect(a).toStrictEqual([2, 40, 6, 8]); - expect(x).toStrictEqual([2, 40, 6, 8]); - var x = [2, 4, 6, 8]; - var a = set$(x, 3, 80); - expect(a).toStrictEqual([2, 4, 6, 80]); -}); - - -test("setPath$", () => { - var x = [[2, 4], 6, 8]; - var a = setPath$(x, [1], 60); - expect(a).toStrictEqual([[2, 4], 60, 8]); - expect(x).toStrictEqual([[2, 4], 60, 8]); - var a = setPath$(x, [0, 1], 40); - expect(a).toStrictEqual([[2, 40], 60, 8]); - var a = setPath$(x, [0, 1, 2], 100); - expect(a).toStrictEqual([[2, 40], 60, 8]); // (path not present, no effect) -}); - - -test("swap", () => { - var x = [1, 2, 3, 4]; - var a = swap(x, 0, 1); - expect(a).toStrictEqual([2, 1, 3, 4]); - var a = swap(x, 0, 3); - expect(a).toStrictEqual([4, 2, 3, 1]); -}); - - -test("swap$", () => { - var x = [1, 2, 3, 4]; - var a = swap$(x, 0, 1); - expect(a).toStrictEqual([2, 1, 3, 4]); - expect(x).toStrictEqual([2, 1, 3, 4]); - var x = [1, 2, 3, 4]; - var a = swap$(x, 0, 3); - expect(a).toStrictEqual([4, 2, 3, 1]); -}); - - -test("remove", () => { - var x = [1, 2, 3, 4, 5]; - var a = remove(x, 2); - expect(a).toStrictEqual([ 1, 2, 4, 5 ]); -}); - - -test("remove$", () => { - var x = [1, 2, 3, 4, 5]; - var a = remove$(x, 2); - expect(a).toStrictEqual([1, 2, 4, 5]); - expect(x).toStrictEqual([1, 2, 4, 5]); -}); - - -test("removePath$", () => { - var x = [[2, 4], 6, 8]; - var a = removePath$(x, [1]); - expect(a).toStrictEqual([[2, 4 ], 8]); - expect(x).toStrictEqual([[2, 4 ], 8]); - var a = removePath$(x, [0, 1]); - expect(a).toStrictEqual([[2 ], 8]); - var a = removePath$(x, [0, 1, 2]); - expect(a).toStrictEqual([[2 ], 8]); // (path not present, no effect) -}); - - - - -// PROPERTY -// -------- - -test("count", () => { - var x = [1, 1, 2, 2, 4]; - var a = count(x, v => v % 2 === 1); - expect(a).toBe(2); - var a = count(x, v => v % 2 === 0); - expect(a).toBe(3); -}); - - -test("countEach", () => { - var x = [1, 1, 2, 2, 4]; - var a = countEach(x); - expect(a).toStrictEqual(new Map([[1, 2], [2, 2], [4, 1]])); - var x = [1, 2, 3, 4]; - var a = countEach(x, v => v % 2); - expect(a).toStrictEqual(new Map([[1, 2], [0, 2]])); -}); - - -test("min", () => { - var x = [1, 2, -3, -4]; - var a = min(x); - expect(a).toBe(-4); - var a = min(x, (a, b) => Math.abs(a) - Math.abs(b)); - expect(a).toBe(1); - var a = min(x, null, v => Math.abs(v)); - expect(a).toBe(1); -}); - - -test("minEntry", () => { - var x = [1, 2, -3, -4]; - var a = minEntry(x); - expect(a).toStrictEqual([3, -4]); - var a = minEntry(x, (a, b) => Math.abs(a) - Math.abs(b)); - expect(a).toStrictEqual([0, 1]); - var a = minEntry(x, null, v => Math.abs(v)); - expect(a).toStrictEqual([0, 1]); -}); - - -test("max", () => { - var x = [1, 2, -3, -4]; - var a = max(x); - expect(a).toBe(2); - var a = max(x, (a, b) => Math.abs(a) - Math.abs(b)); - expect(a).toBe(-4); - var a = max(x, null, v => Math.abs(v)); - expect(a).toBe(-4); -}); - - -test("maxEntry", () => { - var x = [1, 2, -3, -4]; - var a = maxEntry(x); - expect(a).toStrictEqual([1, 2]); - var a = maxEntry(x, (a, b) => Math.abs(a) - Math.abs(b)); - expect(a).toStrictEqual([3, -4]); - var a = maxEntry(x, null, v => Math.abs(v)); - expect(a).toStrictEqual([3, -4]); -}); - - -test("range", () => { - var x = [1, 2, -3, -4]; - var a = range(x); - expect(a).toStrictEqual([-4, 2]); - var a = range(x, (a, b) => Math.abs(a) - Math.abs(b)); - expect(a).toStrictEqual([1, -4]); - var a = range(x, null, v => Math.abs(v)); - expect(a).toStrictEqual([1, -4]); -}); - - -test("rangeEntries", () => { - var x = [1, 2, -3, -4]; - var a = rangeEntries(x); - expect(a).toStrictEqual([[3, -4], [1, 2]]); - var a = rangeEntries(x, (a, b) => Math.abs(a) - Math.abs(b)); - expect(a).toStrictEqual([[0, 1], [3, -4]]); - var a = rangeEntries(x, null, v => Math.abs(v)); - expect(a).toStrictEqual([[0, 1], [3, -4]]); -}); - - - - -// PART -// ---- - -test("slice", () => { - var x = [1, 2, 3, 4, 5]; - var a = slice(x, 2); - expect(a).toStrictEqual([3, 4, 5]); - var a = slice(x, 2, 4); - expect(a).toStrictEqual([3, 4]); - var a = slice(x, -3, -1); - expect(a).toStrictEqual([3, 4]); -}); - - -test("slice$", () => { - var x = [1, 2, 3, 4, 5]; - var a = slice$(x, 2); - expect(a).toStrictEqual([3, 4, 5]); - expect(x).toStrictEqual([3, 4, 5]); - var x = [1, 2, 3, 4, 5]; - var a = slice$(x, 2, 4); - expect(a).toStrictEqual([3, 4]); - var x = [1, 2, 3, 4, 5]; - var a = slice$(x, -3, -1); - expect(a).toStrictEqual([3, 4]); -}); - - -test("head", () => { - var a = head([1, 2, 3]); - expect(a).toBe(1); - var a = head([], -1); - expect(a).toBe(-1); -}); - - -test("last", () => { - var a = last([1, 2, 3]); - expect(a).toBe(3); - var a = last([], -1); - expect(a).toBe(-1); -}); - - -test("tail", () => { - var a = tail([1, 2, 3]); - expect(a).toStrictEqual([2, 3]); - var a = tail([1]); - expect(a).toStrictEqual([]); -}); - - -test("init", () => { - var a = init([1, 2, 3]); - expect(a).toStrictEqual([1, 2]); - var a = init([1]); - expect(a).toStrictEqual([]); -}); - - -test("middle", () => { - var x = [1, 2, 3]; - var a = middle(x, 1, 1); - expect(a).toStrictEqual([2]); - var a = middle(x, 1, 2); - expect(a).toStrictEqual([2, 3]); -}); - - -test("take", () => { - var x = [1, 2, 3, 4, 5]; - var a = take(x, 2); - expect(a).toStrictEqual([1, 2]); - var a = take(x, 3); - expect(a).toStrictEqual([1, 2, 3]); -}); - - -test("takeRight", () => { - var x = [1, 2, 3, 4, 5]; - var a = takeRight(x, 2); - expect(a).toStrictEqual([4, 5]); - var a = takeRight(x, 3); - expect(a).toStrictEqual([3, 4, 5]); -}); - - -test("takeWhile", () => { - var x = [1, 2, 3, 4, 5]; - var a = takeWhile(x, v => v < 3); - expect(a).toStrictEqual([1, 2]); - var a = takeWhile(x, v => v < 4); - expect(a).toStrictEqual([1, 2, 3]); -}); - - -test("takeWhileRight", () => { - var x = [1, 2, 3, 4, 5]; - var a = takeWhileRight(x, v => v >= 3); - expect(a).toStrictEqual([3, 4, 5]); - var a = takeWhileRight(x, v => v >= 4); - expect(a).toStrictEqual([4, 5]); -}); - - -test("drop", () => { - var x = [1, 2, 3, 4, 5]; - var a = drop(x, 2); - expect(a).toStrictEqual([3, 4, 5]); - var a = drop(x, 3); - expect(a).toStrictEqual([4, 5]); -}); - - -test("dropRight", () => { - var x = [1, 2, 3, 4, 5]; - var a = dropRight(x, 2); - expect(a).toStrictEqual([1, 2, 3]); - var a = dropRight(x, 3); - expect(a).toStrictEqual([1, 2]); -}); - - -test("dropWhile", () => { - var x = [1, 2, 3, 4, 5]; - var a = dropWhile(x, v => v < 3); - expect(a).toStrictEqual([3, 4, 5]); - var a = dropWhile(x, v => v < 4); - expect(a).toStrictEqual([4, 5]); -}); - - -test("dropWhileRight", () => { - var x = [1, 2, 3, 4, 5]; - var a = dropWhileRight(x, v => v >= 3); - expect(a).toStrictEqual([1, 2]); - var a = dropWhileRight(x, v => v >= 4); - expect(a).toStrictEqual([1, 2, 3]); -}); - - - - -// ARRANGEMENTS -// ------------ - -test("prefixes", () => { - var a = prefixes([1, 2]); - expect([...a]).toStrictEqual([[], [1], [1, 2]]); - var a = prefixes([1, 2, 3]); - expect([...a]).toStrictEqual([[], [1], [1, 2], [1, 2, 3]]); -}); - - -test("suffixes", () => { - var a = suffixes([1, 2]); - expect([...a]).toStrictEqual([[1, 2], [2], []]); - var a = suffixes([1, 2, 3]); - expect([...a]).toStrictEqual([[1, 2, 3], [2, 3], [3], []]); -}); - - -test("infixes", () => { - var a = infixes([1, 2]); - expect([...a]).toStrictEqual([[], [1], [1, 2], [2]]); - var a = infixes([1, 2, 3]); - expect([...a]).toStrictEqual([[], [1], [1, 2], [1, 2, 3], [2], [2, 3], [3]]); -}); - - -test("subsequences", () => { - var a = subsequences([1, 2]); - expect([...a]).toStrictEqual([[], [1], [2], [1, 2]]); - var a = subsequences([1, 2, 3]); - expect([...a]).toStrictEqual([ - [], [1], - [2], [1, 2], - [3], [1, 3], - [2, 3], [1, 2, 3] - ]); -}); - - -test("permutations", () => { - var a = permutations([1, 2]); - expect([...a]).toStrictEqual([[], [1], [2], [1, 2], [2, 1]]); - var a = permutations([1, 2, 3]); - expect([...a]).toStrictEqual([ - [], [1], - [2], [3], - [1, 2], [1, 3], - [2, 1], [2, 3], - [3, 1], [3, 2], - [1, 2, 3], [1, 3, 2], - [2, 1, 3], [2, 3, 1], - [3, 1, 2], [3, 2, 1] - ]); - var a = permutations([1, 2, 3], 2); - expect([...a]).toStrictEqual([[1, 2], [1, 3], [2, 1], [2, 3], [3, 1], [3, 2]]); -}); - - -test("randomValue", () => { - var x = [1, 2, 3]; - var a = randomValue(x); - expect(includes(x, a)).toBe(true); - var a = randomValue(x); - expect(includes(x, a)).toBe(true); -}); - - -test("randomPrefix", () => { - var x = [1, 2, 3]; - var a = randomPrefix(x); - expect(hasPrefix(x, a)).toBe(true); - var a = randomPrefix(x, 1); - expect(hasPrefix(x, a)).toBe(true); - expect(a.length).toBe(1); - var a = randomPrefix(x, -1); - expect(hasPrefix(x, a)).toBe(true); -}); - - -test("randomSuffix", () => { - var x = [1, 2, 3]; - var a = randomSuffix(x); - expect(hasSuffix(x, a)).toBe(true); - var a = randomSuffix(x, 1); - expect(hasSuffix(x, a)).toBe(true); - expect(a.length).toBe(1); - var a = randomSuffix(x, -1); - expect(hasSuffix(x, a)).toBe(true); -}); - - -test("randomInfix", () => { - var x = [1, 2, 3]; - var a = randomInfix(x); - expect(hasInfix(x, a)).toBe(true); - var a = randomInfix(x, 1); - expect(hasInfix(x, a)).toBe(true); - expect(a.length).toBe(1); - var a = randomInfix(x, -1); - expect(hasInfix(x, a)).toBe(true); -}); - - -test("randomSubsequence", () => { - var x = [1, 2, 3, 4, 5]; - var a = randomSubsequence(x); - expect(hasSubsequence(x, a)).toBe(true); - var a = randomSubsequence(x, 3); - expect(hasSubsequence(x, a)).toBe(true); - expect(a.length).toBe(3); - var a = randomSubsequence(x, 2); - expect(hasSubsequence(x, a)).toBe(true); - expect(a.length).toBe(2); -}); - - -test("randomPermutation", () => { - var x = [1, 2, 3, 4, 5]; - var a = randomPermutation(x); - expect(hasPermutation(x, a)).toBe(true); - var a = randomPermutation(x, 5); - expect(hasPermutation(x, a)).toBe(true); - expect(a.length).toBe(5); - var a = randomPermutation(x, 3); - expect(hasPermutation(x, a)).toBe(true); - expect(a.length).toBe(3); -}); - - -test("randomPermutation$", () => { - var x = [1, 2, 3, 4, 5], y = x.slice(); - var a = randomPermutation$(x); - expect(hasPermutation(y, a)).toBe(true); - expect(x).toStrictEqual(a); - var x = [1, 2, 3, 4, 5], y = x.slice(); - var a = randomPermutation$(x, 5); - expect(hasPermutation(y, a)).toBe(true); - expect(a.length).toBe(5); - var x = [1, 2, 3, 4, 5], y = x.slice(); - var a = randomPermutation$(x, 3); - expect(hasPermutation(y, a)).toBe(true); - expect(a.length).toBe(3); -}); - - - - -// FIND -// ---- - -test("includes", () => { - var x = [1, 2, -3]; - var a = includes(x, 3); - expect(a).toBe(false); - var a = includes(x, -3); - expect(a).toBe(true); -}); - - -test("indexOf", () => { - var x = [1, 2, 3, 2, 5]; - var a = indexOf(x, 2); - expect(a).toBe(1); - var x = [1, 2, 3, 2, 5]; - var a = indexOf(x, 2, 2); - expect(a).toBe(3); -}); - - -test("lastIndexOf", () => { - var x = [1, 2, 3, 2, 5]; - var a = lastIndexOf(x, 2); - expect(a).toBe(3); - var x = [1, 2, 3, 2, 5]; - var a = lastIndexOf(x, 2, 2); - expect(a).toBe(1); -}); - - -test("find", () => { - var x = [1, 2, 3, 4, 5]; - var a = find(x, v => v % 2 == 0); - expect(a).toBe(2); - var a = find(x, v => v % 2 == 1); - expect(a).toBe(1); -}); - - -test("findRight", () => { - var x = [1, 2, 3, 4, 5]; - var a = findRight(x, v => v % 2 == 0); - expect(a).toBe(4); - var a = findRight(x, v => v % 2 == 1); - expect(a).toBe(5); -}); - - -test("scanWhile", () => { - var x = [1, 1, 2, 2, 3, 3, 4, 4]; - var a = scanWhile(x, v => v % 2 !== 0); - expect(a).toBe(2); - var a = scanWhile(x, v => v % 3 !== 0); - expect(a).toBe(4); - var a = scanWhile(x, v => v % 6 !== 0); - expect(a).toBe(8); -}); - - -test("scanWhileRight", () => { - var x = [1, 1, 2, 2, 3, 3, 4, 4]; - var a = scanWhileRight(x, v => v % 3 !== 0); - expect(a).toBe(6); - var a = scanWhileRight(x, v => v % 2 !== 0); - expect(a).toBe(8); - var a = scanWhileRight(x, v => v % 6 !== 0); - expect(a).toBe(0); -}); - - -test("scanUntil", () => { - var x = [1, 1, 2, 2, 3, 3, 4, 4]; - var a = scanUntil(x, v => v % 2 === 0); - expect(a).toBe(2); - var a = scanUntil(x, v => v % 3 === 0); - expect(a).toBe(4); - var a = scanUntil(x, v => v % 6 === 0); - expect(a).toBe(8); -}); - - -test("scanUntilRight", () => { - var x = [1, 1, 2, 2, 3, 3, 4, 4]; - var a = scanUntilRight(x, v => v % 3 === 0); - expect(a).toBe(6); - var a = scanUntilRight(x, v => v % 2 === 0); - expect(a).toBe(8); - var a = scanUntilRight(x, v => v % 6 === 0); - expect(a).toBe(0); -}); - - -test("search", () => { - var x = [1, 2, 3, 2, 5]; - var a = search(x, v => v === 2); - expect(a).toBe(1); - var x = [1, -2, 3, 2, 5]; - var a = search(x, v => Math.abs(v) === 2); - expect(a).toBe(1); -}); - - -test("searchRight", () => { - var x = [1, 2, 3, 2, 5]; - var a = searchRight(x, v => v === 2); - expect(a).toBe(3); - var x = [1, 2, 3, -2, 5]; - var a = searchRight(x, v => Math.abs(v) === 2); - expect(a).toBe(3); -}); - - -test("searchAll", () => { - var x = [1, 2, 3, 2, 5]; - var a = searchAll(x, v => v === 2); - expect(a).toStrictEqual([1, 3]); - var x = [1, 2, 3, -2, 5]; - var a = searchAll(x, v => Math.abs(v) === 2); - expect(a).toStrictEqual([1, 3]); -}); - - -test("searchValue", () => { - var x = [1, 2, 3, 2, 5]; - var a = searchValue(x, 2); - expect(a).toBe(1); - var x = [1, -2, 3, 2, 5]; - var a = searchValue(x, 2, (a, b) => Math.abs(a) - Math.abs(b)); - expect(a).toBe(1); - var x = [1, -2, 3, 2, 5]; - var a = searchValue(x, 2, null, v => Math.abs(v)); - expect(a).toBe(1); -}); - - -test("searchValueRight", () => { - var x = [1, 2, 3, 2, 5]; - var a = searchValueRight(x, 2); - expect(a).toBe(3); - var x = [1, 2, 3, -2, 5]; - var a = searchValueRight(x, 2, (a, b) => Math.abs(a) - Math.abs(b)); - expect(a).toBe(3); - var a = searchValueRight(x, 2, null, v => Math.abs(v)); - expect(a).toBe(3); -}); - - -test("searchValueAll", () => { - var x = [1, 2, 3, 2, 5]; - var a = searchValueAll(x, 2); - expect(a).toStrictEqual([1, 3]); - var x = [1, 2, 3, -2, 5]; - var a = searchValueAll(x, 2, (a, b) => Math.abs(a) - Math.abs(b)); - expect(a).toStrictEqual([1, 3]); - var a = searchValueAll(x, 2, null, v => Math.abs(v)); - expect(a).toStrictEqual([1, 3]); -}); - - -test("searchMinimumValues", () => { - var x = [2, 5, 3, 1, 4]; - var a = searchMinimumValues(x, 3); - expect(a).toStrictEqual([3, 0, 2]); -}); - - -test("searchInfix", () => { - var x = [1, 2, 3, 4]; - var y = [2, 3]; - var a = searchInfix(x, y); - expect(a).toBe(1); - var y = [-2, -3]; - var a = searchInfix(x, y); - expect(a).toBe(-1); - var a = searchInfix(x, y, (a, b) => Math.abs(a) - Math.abs(b)); - expect(a).toBe(1); - var a = searchInfix(x, y, null, v => Math.abs(v)); - expect(a).toBe(1); -}); - - -test("searchInfixRight", () => { - var x = [1, 2, 3, 4]; - var y = [2, 3]; - var a = searchInfixRight(x, y); - expect(a).toBe(1); - var y = [-2, -3]; - var a = searchInfixRight(x, y); - expect(a).toBe(-1); - var a = searchInfixRight(x, y, (a, b) => Math.abs(a) - Math.abs(b)); - expect(a).toBe(1); - var a = searchInfixRight(x, y, null, v => Math.abs(v)); - expect(a).toBe(1); -}); - - -test("searchInfixAll", () => { - var x = [1, 2, 3, 4, -2, -3]; - var y = [2, 3]; - var a = searchInfixAll(x, y); - expect(a).toStrictEqual([1]); - var y = [-2, -3]; - var a = searchInfixAll(x, y); - expect(a).toStrictEqual([4]); - var a = searchInfixAll(x, y, (a, b) => Math.abs(a) - Math.abs(b)); - expect(a).toStrictEqual([1, 4]); - var a = searchInfixAll(x, y, null, v => Math.abs(v)); - expect(a).toStrictEqual([1, 4]); -}); - - -test("searchSubsequence", () => { - var x = [1, 2, 3, 4]; - var a = searchSubsequence(x, [2, 4]); - expect(a).toBe(1); - var a = searchSubsequence(x, [-2, -4]); - expect(a).toBe(-1); - var a = searchSubsequence(x, [-2, -4], (a, b) => Math.abs(a) - Math.abs(b)); - expect(a).toBe(1); - var a = searchSubsequence(x, [-2, -4], null, v => Math.abs(v)); - expect(a).toBe(1); -}); - - -test("hasValue", () => { - var x = [1, 2, -3]; - var a = hasValue(x, 3); - expect(a).toBe(false); - var a = hasValue(x, 3, (a, b) => Math.abs(a) - Math.abs(b)); - expect(a).toBe(true); - var a = hasValue(x, 3, null, v => Math.abs(v)); - expect(a).toBe(true); -}); - - -test("hasPrefix", () => { - var x = [1, 2, 3, 4]; - var a = hasPrefix(x, [1, 2]); - expect(a).toBe(true); - var a = hasPrefix(x, [-1, -2]); - expect(a).toBe(false); - var a = hasPrefix(x, [-1, -2], (a, b) => Math.abs(a) - Math.abs(b)); - expect(a).toBe(true); - var a = hasPrefix(x, [-1, -2], null, v => Math.abs(v)); - expect(a).toBe(true); -}); - - -test("hasSuffix", () => { - var x = [1, 2, 3, 4]; - var a = hasSuffix(x, [3, 4]); - expect(a).toBe(true); - var a = hasSuffix(x, [-3, -4]); - expect(a).toBe(false); - var a = hasSuffix(x, [-3, -4], (a, b) => Math.abs(a) - Math.abs(b)); - expect(a).toBe(true); - var a = hasSuffix(x, [-3, -4], null, v => Math.abs(v)); - expect(a).toBe(true); -}); - - -test("hasInfix", () => { - var x = [1, 2, 3, 4]; - var a = hasInfix(x, [2, 3]); - expect(a).toBe(true); - var a = hasInfix(x, [-2, -3]); - expect(a).toBe(false); - var a = hasInfix(x, [-2, -3], (a, b) => Math.abs(a) - Math.abs(b)); - expect(a).toBe(true); - var a = hasInfix(x, [-2, -3], null, v => Math.abs(v)); - expect(a).toBe(true); -}); - - -test("hasSubsequence", () => { - var x = [1, 2, 3, 4]; - var a = hasSubsequence(x, [2, 4]); - expect(a).toBe(true); - var a = hasSubsequence(x, [-2, -4]); - expect(a).toBe(false); - var a = hasSubsequence(x, [-2, -4], (a, b) => Math.abs(a) - Math.abs(b)); - expect(a).toBe(true); - var a = hasSubsequence(x, [-2, -4], null, v => Math.abs(v)); - expect(a).toBe(true); -}); - - -test("hasPermutation", () => { - var x = [1, 2, 3, 4]; - var a = hasPermutation(x, [4, 3, 2, 1]); - expect(a).toBe(true); - var a = hasPermutation(x, [3, -1, -2, 4]); - expect(a).toBe(false); - var a = hasPermutation(x, [3, -1, -2, 4], (a, b) => Math.abs(a) - Math.abs(b)); - expect(a).toBe(true); - var a = hasPermutation(x, [3, -1, -2, 4], null, v => Math.abs(v)); - expect(a).toBe(true); -}); - - - - -// FUNCTIONAL -// ---------- - -test("forEach", () => { - var x = [1, 2, -3, -4]; - var a: number[] = []; - forEach(x, v => a.push(v)); - expect(a).toStrictEqual(x); -}); - - -test("some", () => { - var x = [1, 2, -3, -4]; - var a = some(x, v => v > 10); - expect(a).toStrictEqual(false); - var a = some(x, v => v < 0); - expect(a).toStrictEqual(true); -}); - - -test("every", () => { - var x = [1, 2, -3, -4]; - var a = every(x, v => v > 0); - expect(a).toBe(false); - var a = every(x, v => v > -10); - expect(a).toBe(true); -}); - - -test("map", () => { - var x = [1, 2, 3, 4]; - var a = map(x, v => v * 2); - expect(a).toStrictEqual([2, 4, 6, 8]); -}); - - -test("map$", () => { - var x = [1, 2, 3, 4]; - var a = map$(x, v => v * 2); - expect(a).toStrictEqual([2, 4, 6, 8]); - expect(x).toStrictEqual([2, 4, 6, 8]); -}); - - -test("reduce", () => { - var x = [1, 2, 3, 4]; - var a = reduce(x, (acc, v) => acc+v); - expect(a).toBe(10); - var a = reduce(x, (acc, v) => acc+v, 100); - expect(a).toBe(110); -}); - - -test("reduceRight", () => { - var x = [1, 2, 3, 4]; - var a = reduceRight(x, (acc, v) => acc+v); - expect(a).toBe(10); - var a = reduceRight(x, (acc, v) => acc+v, 100); - expect(a).toBe(110); -}); - - -test("filter", () => { - var x = [1, 2, 3, 4, 5]; - var a = filter(x, v => v % 2 === 1); - expect(a).toStrictEqual([1, 3, 5]); - var a = filter(x, v => v % 2 === 0); - expect(a).toStrictEqual([2, 4]); -}); - - -test("filter$", () => { - var x = [1, 2, 3, 4, 5]; - var a = filter$(x, v => v % 2 === 1); - expect(a).toStrictEqual([1, 3, 5]); - expect(x).toStrictEqual([1, 3, 5]); - var x = [1, 2, 3, 4, 5]; - var a = filter$(x, v => v % 2 === 0); - expect(a).toStrictEqual([2, 4]); -}); - - -test("filterAt", () => { - var x = [2, 4, 6, 8]; - var a = filterAt(x, [1, 2]); - expect(a).toStrictEqual([4, 6]); - var a = filterAt(x, [1, 3]); - expect(a).toStrictEqual([4, 8]); -}); - - -test("reject", () => { - var x = [1, 2, 3, 4, 5]; - var a = reject(x, v => v % 2 === 1); - expect(a).toStrictEqual([2, 4]); - var a = reject(x, v => v % 2 === 0); - expect(a).toStrictEqual([1, 3, 5]); -}); - - -test("reject$", () => { - var x = [1, 2, 3, 4, 5]; - var a = reject$(x, v => v % 2 === 1); - expect(a).toStrictEqual([2, 4]); - expect(x).toStrictEqual([2, 4]); - var x = [1, 2, 3, 4, 5]; - var a = reject$(x, v => v % 2 === 0); - expect(a).toStrictEqual([1, 3, 5]); -}); - - -test("rejectAt", () => { - var x = [2, 4, 6, 8]; - var a = rejectAt(x, [1, 2]); - expect(a).toStrictEqual([2, 8]); - var a = rejectAt(x, [1, 3]); - expect(a).toStrictEqual([2, 6]); -}); - - -test("inclusiveScan", () => { - var x = [1, 2, 3, 4]; - var a = inclusiveScan(x, (acc, v) => acc+v); - expect(a).toStrictEqual([1, 3, 6, 10]); - var a = inclusiveScan(x, (acc, v) => acc+v, 100); - expect(a).toStrictEqual([101, 103, 106, 110]); -}); - - -test("flat", () => { - var x = [[1, 2], [3, [4, [5]]]]; - var a = flat(x); - expect(a).toStrictEqual([1, 2, 3, 4, 5]); - var a = flat(x, 1); - expect(a).toStrictEqual([1, 2, 3, [4, [5]]]); - var a = flat(x, 2); - expect(a).toStrictEqual([1, 2, 3, 4, [5]]); -}); - - -test("flatMap", () => { - var x = [[1, 2], [3, [4, [5]]]]; - var a = flatMap(x); - expect(a).toStrictEqual([1, 2, 3, [4, [5]]]); - var a = flatMap(x, v => flat(v, 1)); - expect(a).toStrictEqual([1, 2, 3, 4, [5]]); - var a = flatMap(x, v => flat(v)); - expect(a).toStrictEqual([1, 2, 3, 4, 5]); -}); - - -test("zip", () => { - var x = [1, 2, 3]; - var y = [4, 5]; - var a = zip([x, y]); - expect(a).toStrictEqual([[1, 4], [2, 5]]); // (shortest) - var b = zip([x, y], ([a, b]) => a + b); - expect(b).toStrictEqual([5, 7]); - var a = zip([x, y], null, some); - expect(a).toStrictEqual([[1, 4], [2, 5]]); // (shortest) - var a = zip([x, y], null, every, 0); - expect(a).toStrictEqual([[1, 4], [2, 5], [3, 0]]); // (longest) - var a = zip([x, y], null, head, 0); - expect(a).toStrictEqual([[1, 4], [2, 5], [3, 0]]); // (first) -}); - - - - -// MANIPULATION -// ------------ - -test("fill", () => { - var x = [1, 2, 3, 4]; - var a = fill(x, 2); - expect(a).toStrictEqual([2, 2, 2, 2]); - var a = fill(x, 2, 1); - expect(a).toStrictEqual([1, 2, 2, 2]); - var a = fill(x, 2, 1, 3); - expect(a).toStrictEqual([1, 2, 2, 4]); -}); - - -test("fill$", () => { - var x = [1, 2, 3, 4]; - var a = fill$(x, 2); - expect(a).toStrictEqual([2, 2, 2, 2]); - expect(x).toStrictEqual([2, 2, 2, 2]); - var x = [1, 2, 3, 4]; - var a = fill$(x, 2, 1); - expect(a).toStrictEqual([1, 2, 2, 2]); - var x = [1, 2, 3, 4]; - var a = fill$(x, 2, 1, 3); - expect(a).toStrictEqual([1, 2, 2, 4]); -}); - - -test("sort", () => { - var x = [-2, -3, 1, 4]; - var a = sort(x); - expect(a).toStrictEqual([-3, -2, 1, 4]); // (compares numbers) - var a = sort(x, (a, b) => Math.abs(a) - Math.abs(b)); - expect(a).toStrictEqual([1, -2, -3, 4]); - var a = sort(x, null, v => Math.abs(v)); - expect(a).toStrictEqual([1, -2, -3, 4]); -}); - - -// TODO: Check various array lengths. -test("sort$", () => { - var x = [-2, -3, 1, 4]; - var a = sort$(x); - expect(a).toStrictEqual([ -3, -2, 1, 4 ]); // (compares numbers) - expect(x).toStrictEqual([ -3, -2, 1, 4 ]); - var x = [-2, -3, 1, 4]; - var a = sort$(x, (a, b) => Math.abs(a) - Math.abs(b)); - expect(a).toStrictEqual([ 1, -2, -3, 4 ]); - var x = [-2, -3, 1, 4]; - var a = sort$(x, null, v => Math.abs(v)); - expect(a).toStrictEqual([ 1, -2, -3, 4 ]); -}); - - -test("push", () => { - var x = [1, 2]; - var a = push(x, 3); - expect(a).toStrictEqual([1, 2, 3]); - var a = push(x, 3, 4); - expect(a).toStrictEqual([1, 2, 3, 4]); -}); - - -test("push$", () => { - var x = [1, 2]; - var a = push$(x, 3); - expect(a).toStrictEqual([1, 2, 3]); - expect(x).toStrictEqual([1, 2, 3]); - var x = [1, 2]; - var a = push$(x, 3, 4); - expect(a).toStrictEqual([1, 2, 3, 4]); -}); - - -test("pop", () => { - var x = [1, 2, 3]; - var a = pop(x); - expect(a).toStrictEqual([1, 2]); - var x = [1, 2, 3, 4]; - var a = pop(x); - expect(a).toStrictEqual([1, 2, 3]); -}); - - -test("pop$", () => { - var x = [1, 2, 3]; - var a = pop$(x); - expect(a).toStrictEqual([1, 2]); - expect(x).toStrictEqual([1, 2]); - var x = [1, 2, 3, 4]; - var a = pop$(x); - expect(a).toStrictEqual([1, 2, 3]); -}); - - -test("shift", () => { - var x = [1, 2, 3]; - var a = shift(x); - expect(a).toStrictEqual([2, 3]); - var x = [1, 2, 3, 4]; - var a = shift(x); - expect(a).toStrictEqual([2, 3, 4]); -}); - - -test("shift$", () => { - var x = [1, 2, 3]; - var a = shift$(x); - expect(a).toStrictEqual([2, 3]); - expect(x).toStrictEqual([2, 3]); - var x = [1, 2, 3, 4]; - var a = shift$(x); - expect(a).toStrictEqual([2, 3, 4]); -}); - - -test("unshift", () => { - var x = [3, 4]; - var a = unshift(x, 2); - expect(a).toStrictEqual([2, 3, 4]); - var a = unshift(x, 1, 2); - expect(a).toStrictEqual([1, 2, 3, 4]); -}); - - -test("unshift$", () => { - var x = [3, 4]; - var a = unshift$(x, 2); - expect(a).toStrictEqual([2, 3, 4]); - expect(x).toStrictEqual([2, 3, 4]); - var x = [3, 4]; - var a = unshift$(x, 1, 2); - expect(a).toStrictEqual([1, 2, 3, 4]); -}); - - -test("copy", () => { - var x = [1, 2, 3, 4, 5]; - var y = [10, 20, 30]; - var a = copy(x, y); - expect(a).toStrictEqual([10, 20, 30, 4, 5]); - var a = copy(x, y, 1); - expect(a).toStrictEqual([1, 10, 20, 30, 5]); - var a = copy(x, y, 1, 1); - expect(a).toStrictEqual([1, 20, 30, 4, 5]); - var a = copy(x, y, 1, 1, 2); - expect(a).toStrictEqual([1, 20, 3, 4, 5]); -}); - - -test("copy$", () => { - var x = [1, 2, 3, 4, 5]; - var y = [10, 20, 30]; - var a = copy$(x, y); - expect(a).toStrictEqual([10, 20, 30, 4, 5]); - expect(x).toStrictEqual([10, 20, 30, 4, 5]); - var x = [1, 2, 3, 4, 5]; - var a = copy$(x, y, 1); - expect(a).toStrictEqual([1, 10, 20, 30, 5]); - var x = [1, 2, 3, 4, 5]; - var a = copy$(x, y, 1, 1); - expect(a).toStrictEqual([1, 20, 30, 4, 5]); - var x = [1, 2, 3, 4, 5]; - var a = copy$(x, y, 1, 1, 2); - expect(a).toStrictEqual([1, 20, 3, 4, 5]); -}); - - -test("copyWithin", () => { - var x = [1, 2, 3, 4, 5]; - var a = copyWithin(x, 3); - expect(a).toStrictEqual([1, 2, 3, 1, 2]); - var a = copyWithin(x, 3, 1); - expect(a).toStrictEqual([1, 2, 3, 2, 3]); - var a = copyWithin(x, 3, 1, 2); - expect(a).toStrictEqual([1, 2, 3, 2, 5]); -}); - - -test("copyWithin$", () => { - var x = [1, 2, 3, 4, 5]; - var a = copyWithin$(x, 3); - expect(a).toStrictEqual([1, 2, 3, 1, 2]); - expect(x).toStrictEqual([1, 2, 3, 1, 2]); - var x = [1, 2, 3, 4, 5]; - var a = copyWithin$(x, 3, 1); - expect(a).toStrictEqual([1, 2, 3, 2, 3]); - var x = [1, 2, 3, 4, 5]; - var a = copyWithin$(x, 3, 1, 2); - expect(a).toStrictEqual([1, 2, 3, 2, 5]); -}); - - -test("moveWithin", () => { - var x = [1, 2, 3, 4, 5, 6]; - var a = moveWithin(x, 0, 1, 3); - expect(a).toStrictEqual([2, 3, 1, 4, 5, 6]); // (2,3 to left) - var a = moveWithin(x, 6, 3, 5); - expect(a).toStrictEqual([1, 2, 3, 6, 4, 5]); // (4,5 to right) -}); - - -test("moveWithin$", () => { - var x = [1, 2, 3, 4, 5, 6]; - var a = moveWithin$(x, 0, 1, 3); - expect(a).toStrictEqual([2, 3, 1, 4, 5, 6]); // (2,3 to left) - expect(x).toStrictEqual([2, 3, 1, 4, 5, 6]); - var x = [1, 2, 3, 4, 5, 6]; - var a = moveWithin$(x, 6, 3, 5); - expect(a).toStrictEqual([1, 2, 3, 6, 4, 5]); // (4,5 to right) -}); - - -test("splice", () => { - var x = [1, 2, 3, 4, 5]; - var a = splice(x, 2); - expect(a).toStrictEqual([1, 2]); - var a = splice(x, 2, 2); - expect(a).toStrictEqual([1, 2, 5]); - var a = splice(x, 2, 2, 30, 40); - expect(a).toStrictEqual([1, 2, 30, 40, 5]); -}); - - -test("splice$", () => { - var x = [1, 2, 3, 4, 5]; - var a = splice$(x, 2); - expect(a).toStrictEqual([1, 2]); - expect(x).toStrictEqual([1, 2]); - var x = [1, 2, 3, 4, 5]; - var a = splice$(x, 2, 2); - expect(a).toStrictEqual([1, 2, 5]); - var x = [1, 2, 3, 4, 5]; - var a = splice$(x, 2, 2, 30, 40); - expect(a).toStrictEqual([1, 2, 30, 40, 5]); -}); - - -test("split", () => { - var x = [1, 2, 2, 3, 5, 4, 4, 7]; - var a = split(x, v => v % 2 === 0); - expect(a).toStrictEqual([[1], [3, 5], [7]]); - var x = [2, 4, 5, 6, 8]; - var a = split(x, v => v % 2 === 0); - expect(a).toStrictEqual([[5]]); -}); - - -test("splitAt", () => { - var x = [1, 2, 2, 3, 5, 4, 4, 7]; - var a = splitAt(x, [1, 2, 5, 6]); - expect(a).toStrictEqual([[1], [3, 5], [7]]); - var x = [2, 4, 5, 6, 8]; - var a = splitAt(x, [0, 1, 3, 4]); - expect(a).toStrictEqual([[5]]); -}); - - -test("cut", () => { - var x = [1, 2, 3, 4, 5]; - var a = cut(x, (v, i) => i===1 || i===3); - expect(a).toStrictEqual([ [ 1 ], [ 2, 3 ], [ 4, 5 ] ]); - var a = cut(x, (v, i) => i===0 || i===4); - expect(a).toStrictEqual([ [], [ 1, 2, 3, 4 ], [ 5 ] ]); -}); - - -test("cutRight", () => { - var x = [1, 2, 3, 4, 5]; - var a = cutRight(x, (v, i) => i===1 || i===3); - expect(a).toStrictEqual([ [ 1, 2 ], [ 3, 4 ], [ 5 ] ]); - var a = cutRight(x, (v, i) => i===0 || i===4); - expect(a).toStrictEqual([ [ 1 ], [ 2, 3, 4, 5 ], [] ]); -}); - - -test("cutAt", () => { - var x = [1, 2, 3, 4, 5]; - var a = cutAt(x, [1, 3]); - expect(a).toStrictEqual([[1], [2, 3], [4, 5]]); - var a = cutAt(x, [0, 4]); - expect(a).toStrictEqual([[], [1, 2, 3, 4], [5]]); -}); - - -test("cutAtRight", () => { - var x = [1, 2, 3, 4, 5]; - var a = cutAtRight(x, [1, 3]); - expect(a).toStrictEqual([[1, 2], [3, 4], [5]]); - var a = cutAtRight(x, [0, 4]); - expect(a).toStrictEqual([[1], [2, 3, 4, 5], []]); -}); - - -test("group", () => { - var x = [1, 2, 2, -2, -2, 4]; - var a = group(x); - expect(a).toStrictEqual([[1], [2, 2], [-2, -2], [4]]); - var a = group(x, (a, b) => Math.abs(a) - Math.abs(b)); - expect(a).toStrictEqual([[1], [2, 2, -2, -2], [4]]); - var a = group(x, null, v => Math.abs(v)); - expect(a).toStrictEqual([[1], [2, 2, -2, -2], [4]]); -}); - - -test("partition", () => { - var x = [1, 2, 3, 4]; - var a = partition(x, v => v % 2 == 0); - expect(a).toStrictEqual([[2, 4], [1, 3]]); - var x = [1, 2, 3, 4, 5]; - var a = partition(x, v => v % 2 == 1); - expect(a).toStrictEqual([[1, 3, 5], [2, 4]]); -}); - - -test("partitionEach", () => { - var x = [1, 2, 3, 4]; - var a = partitionEach(x, v => v % 2 == 0); - expect(a).toStrictEqual(new Map([[false, [1, 3]], [true, [2, 4]]])); - var x = [1, 2, 3, 4, 5]; - var b = partitionEach(x, v => v % 3); - expect(b).toStrictEqual(new Map([[1, [1, 4]], [2, [2, 5]], [0, [3]]])); -}); - - -test("chunk", () => { - var x = [1, 2, 3, 4, 5, 6, 7, 8]; - var a = chunk(x, 3); - expect(a).toStrictEqual([[1, 2, 3], [4, 5, 6], [7, 8]]); - var a = chunk(x, 2, 3); - expect(a).toStrictEqual([[1, 2], [4, 5], [7, 8]]); - var a = chunk(x, 4, 3); - expect(a).toStrictEqual([[1, 2, 3, 4], [4, 5, 6, 7], [7, 8]]); -}); - - -test("cycle", () => { - var x = [1, 2, 3]; - var a = cycle(x, 0, 2); - expect(a).toStrictEqual([1, 2]); - var a = cycle(x, 0, 4); - expect(a).toStrictEqual([1, 2, 3, 1]); - var a = cycle(x, 1, 6); - expect(a).toStrictEqual([2, 3, 1, 2, 3, 1]); -}); - - -test("repeat", () => { - var x = [1, 2]; - var a = repeat(x, 2); - expect(a).toStrictEqual([1, 2, 1, 2]); - var a = repeat(x, 3); - expect(a).toStrictEqual([1, 2, 1, 2, 1, 2]); -}); - - -test("reverse", () => { - var x = [1, 2, 3, 4]; - var a = reverse(x); - expect(a).toStrictEqual([4, 3, 2, 1]); -}); - - -test("reverse$", () => { - var x = [1, 2, 3, 4]; - var a = reverse$(x); - expect(a).toStrictEqual([4, 3, 2, 1]); - expect(x).toStrictEqual([4, 3, 2, 1]); -}); - - -test("rotate", () => { - var x = [1, 2, 3, 4]; - var a = rotate(x, 1); - expect(a).toStrictEqual([2, 3, 4, 1]); - var a = rotate(x, 2); - expect(a).toStrictEqual([3, 4, 1, 2]); - var a = rotate(x, -1); - expect(a).toStrictEqual([4, 1, 2, 3]); -}); - - -test("rotate$", () => { - var x = [1, 2, 3, 4]; - var a = rotate$(x, 1); - expect(a).toStrictEqual([2, 3, 4, 1]); - expect(x).toStrictEqual([2, 3, 4, 1]); - var x = [1, 2, 3, 4]; - var a = rotate$(x, 2); - expect(a).toStrictEqual([3, 4, 1, 2]); - var x = [1, 2, 3, 4]; - var a = rotate$(x, -1); - expect(a).toStrictEqual([4, 1, 2, 3]); -}); - - -test("intersperse", () => { - var x = [1, 2, 3]; - var a = intersperse(x, 10); - expect(a).toStrictEqual([1, 10, 2, 10, 3]); - var x = [1, 2, 3, 4]; - var a = intersperse(x, 10); - expect(a).toStrictEqual([1, 10, 2, 10, 3, 10, 4]); -}); - - -test("interpolate", () => { - var x = [1, 2, 3]; - var a = interpolate(x, (a, b) => (a + b)/2); - expect(a).toStrictEqual([1, 1.5, 2, 2.5, 3]); -}); - - -test("intermix", () => { - var x = [1, 2, 3, 4]; - var y = [10, 20, 30]; - var a = intermix(x, [10]); - expect(a).toStrictEqual([1, 10, 2, 10, 3, 10, 4]); - var a = intermix(x, y); - expect(a).toStrictEqual([1, 10, 2, 20, 3, 30, 4]); - var a = intermix(x, y, 2); - expect(a).toStrictEqual([1, 2, 10, 3, 4]); - var a = intermix(x, y, 1, 2); - expect(a).toStrictEqual([1, 10, 20, 2, 30, 10, 3, 20, 30, 4]); -}); - - -test("interleave", () => { - var x = [1, 2, 3, 4]; - var y = [10, 20, 30, 40]; - var a = interleave([x, y]); - expect(a).toStrictEqual([1, 10, 2, 20, 3, 30, 4, 40]); - var y = [10, 20]; - var a = interleave([x, y]); - expect(a).toStrictEqual([1, 10, 2, 20, 3, 4]); -}); - - - - -// COMBINE -// ------- - -test("concat", () => { - var x = [1, 2]; - var y = [3, 4]; - var a = concat(x, y); - expect(a).toStrictEqual([1, 2, 3, 4]); - var a = concat(x, y, y); - expect(a).toStrictEqual([1, 2, 3, 4, 3, 4]); -}); - - -test("concat$", () => { - var x = [1, 2]; - var y = [3, 4]; - var a = concat$(x, y); - expect(a).toStrictEqual([1, 2, 3, 4]); - expect(x).toStrictEqual([1, 2, 3, 4]); - var x = [1, 2]; - var a = concat$(x, y, y); - expect(a).toStrictEqual([1, 2, 3, 4, 3, 4]); -}); - - -test("join", () => { - var x = [1, 2]; - var a = join(x); - expect(a).toBe("1,2"); - var a = join(x, " : "); - expect(a).toBe("1 : 2"); -}); - - - - -// SET OPERATIONS -// -------------- - -test("isUnique", () => { - var x = [1, 2, -1, -2]; - var a = isUnique(x); - expect(a).toBe(true); - var a = isUnique(x, (a, b) => Math.abs(a) - Math.abs(b)); - expect(a).toBe(false); - var a = isUnique(x, null, v => Math.abs(v)); - expect(a).toBe(false); -}); - - -test("isDisjoint", () => { - var x = [1, 2, 3, 4]; - var a = isDisjoint(x, [2, 5]); - expect(a).toBe(false); - var a = isDisjoint(x, [-2, -5]); - expect(a).toBe(true); - var a = isDisjoint(x, [-2, -5], (a, b) => Math.abs(a) - Math.abs(b)); - expect(a).toBe(false); - var a = isDisjoint(x, [-2, -5], null, v => Math.abs(v)); - expect(a).toBe(false); -}); - - -test("unique", () => { - var x = [1, 2, 3, 4, 2, 3]; - var a = unique(x); - expect(a).toStrictEqual([1, 2, 3, 4]); - var x = [1, 2, 3, 4, -2, -3]; - var a = unique(x, (a, b) => Math.abs(a) - Math.abs(b)); - expect(a).toStrictEqual([1, 2, 3, 4]); - var a = unique(x, null, v => Math.abs(v)); - expect(a).toStrictEqual([1, 2, 3, 4]); -}); - - -test("union", () => { - var x = [1, 2, 3, 4]; - var y = [2, 3, 5]; - var a = union(x, y); - expect(a).toStrictEqual([1, 2, 3, 4, 5]); - var y = [-2, -3, -5]; - var a = union(x, y, (a, b) => Math.abs(a) - Math.abs(b)); - expect(a).toStrictEqual([1, 2, 3, 4, -5]); - var a = union(x, y, null, v => Math.abs(v)); - expect(a).toStrictEqual([1, 2, 3, 4, -5]); -}); - - -test("union$", () => { - var x = [1, 2, 3, 4]; - var y = [2, 3, 5]; - var a = union$(x, y); - expect(a).toStrictEqual([1, 2, 3, 4, 5]); - expect(x).toStrictEqual([1, 2, 3, 4, 5]); - var x = [1, 2, 3, 4]; - var y = [-2, -3, -5]; - var a = union$(x, y, (a, b) => Math.abs(a) - Math.abs(b)); - expect(a).toStrictEqual([1, 2, 3, 4, -5]); - var x = [1, 2, 3, 4]; - var a = union$(x, y, null, v => Math.abs(v)); - expect(a).toStrictEqual([1, 2, 3, 4, -5]); -}); - - -test("intersection", () => { - var x = [1, 2, 3, 4]; - var y = [2, 3, 5]; - var a = intersection(x, y); - expect(a).toStrictEqual([2, 3]); - var y = [-2, -3, -5]; - var a = intersection(x, y, (a, b) => Math.abs(a) - Math.abs(b)); - expect(a).toStrictEqual([2, 3]); - var a = intersection(x, y, null, v => Math.abs(v)); - expect(a).toStrictEqual([2, 3]); -}); - - -test("difference", () => { - var x = [1, 2, 3, 4, 5]; - var y = [2, 4]; - var a = difference(x, y); - expect(a).toStrictEqual([1, 3, 5]); - var y = [-2, -4]; - var a = difference(x, y); - expect(a).toStrictEqual([1, 2, 3, 4, 5]); - var a = difference(x, y, (a, b) => Math.abs(a) - Math.abs(b)); - expect(a).toStrictEqual([1, 3, 5]); - var a = difference(x, y, null, v => Math.abs(v)); - expect(a).toStrictEqual([1, 3, 5]); -}); - - -test("symmetricDifference", () => { - var x = [1, 2, 3, 4]; - var y = [3, 4, 5]; - var a = symmetricDifference(x, y); - expect(a).toStrictEqual([ 1, 2, 5]); - var y = [-3, -4, -5]; - var a = symmetricDifference(x, y); - expect(a).toStrictEqual([ - 1, 2, 3, 4, - -3, -4, -5 - ]); - var a = symmetricDifference(x, y, (a, b) => Math.abs(a) - Math.abs(b)); - expect(a).toStrictEqual([ 1, 2, -5]); - var a = symmetricDifference(x, y, null, v => Math.abs(v)); - expect(a).toStrictEqual([ 1, 2, -5]); -}); - - -test("cartesianProduct", () => { - var x = [1, 2, 3]; - var y = [10, 20, 30]; - var a = cartesianProduct([x, y]); - expect(a).toStrictEqual([ - [ 1, 10 ], [ 1, 20 ], - [ 1, 30 ], [ 2, 10 ], - [ 2, 20 ], [ 2, 30 ], - [ 3, 10 ], [ 3, 20 ], - [ 3, 30 ] - ]); - - var a = cartesianProduct([x, y], ([a, b]) => a + b); - expect(a).toStrictEqual([ - 11, 21, 31, 12, 22, - 32, 13, 23, 33 - ]); -}); diff --git a/tsconfig.json b/tsconfig.json deleted file mode 100644 index 6f138d2a0..000000000 --- a/tsconfig.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "compilerOptions": { - "target": "ES2018", - "module": "NodeNext", - "esModuleInterop": true, - "moduleResolution": "nodenext", - "declaration": true, - "declarationMap": true, - "sourceMap": true, - "outDir": ".build" - }, - "include": [ - "src/**/*" - ], -} diff --git a/types/CombineFunction.html b/types/CombineFunction.html new file mode 100644 index 000000000..2b3c38185 --- /dev/null +++ b/types/CombineFunction.html @@ -0,0 +1,332 @@ +CombineFunction | extra-array
+
+ +
+
+
+
+ +

Type alias CombineFunction<T>

+
CombineFunction<T>: ((a, b) => T)
+
+

Type Parameters

+
    +
  • +

    T

+
+

Type declaration

+
    +
  • +
      +
    • (a, b): T
    • +
    • +

      Handle combining of two values.

      +
      +
      +

      Parameters

      +
        +
      • +
        a: T
        +

        a value

        +
        +
      • +
      • +
        b: T
        +

        another value

        +
        +
      +

      Returns T

      combined value

      + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/types/CompareFunction.html b/types/CompareFunction.html new file mode 100644 index 000000000..bb7705a5d --- /dev/null +++ b/types/CompareFunction.html @@ -0,0 +1,332 @@ +CompareFunction | extra-array
+
+ +
+
+
+
+ +

Type alias CompareFunction<T>

+
CompareFunction<T>: ((a, b) => number)
+
+

Type Parameters

+
    +
  • +

    T

+
+

Type declaration

+
    +
  • +
      +
    • (a, b): number
    • +
    • +

      Handle comparison of two values.

      +
      +
      +

      Parameters

      +
        +
      • +
        a: T
        +

        a value

        +
        +
      • +
      • +
        b: T
        +

        another value

        +
        +
      +

      Returns number

      a<b: -ve, a=b: 0, a>b: +ve

      + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/types/EndFunction.html b/types/EndFunction.html new file mode 100644 index 000000000..53bc247f4 --- /dev/null +++ b/types/EndFunction.html @@ -0,0 +1,322 @@ +EndFunction | extra-array
+
+ +
+
+
+
+ +

Type alias EndFunction

+
EndFunction: ((dones) => boolean)
+
+

Type declaration

+
    +
  • +
      +
    • (dones): boolean
    • +
    • +

      Handle ending of a combined array.

      +
      +
      +

      Parameters

      +
        +
      • +
        dones: boolean[]
        +

        iᵗʰ array done?

        +
        +
      +

      Returns boolean

      combined array done?

      + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/types/Entries.html b/types/Entries.html new file mode 100644 index 000000000..ac1ef885e --- /dev/null +++ b/types/Entries.html @@ -0,0 +1,310 @@ +Entries | extra-array
+
+ +
+
+
+
+ +

Type alias Entries<T>

+
Entries<T>: [number, T][]
+

Entries is an array of index-value pairs, with unique indices.

+
+
+

Type Parameters

+
    +
  • +

    T

+
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/types/IEntries.html b/types/IEntries.html new file mode 100644 index 000000000..8714bf85f --- /dev/null +++ b/types/IEntries.html @@ -0,0 +1,310 @@ +IEntries | extra-array
+
+ +
+
+
+
+ +

Type alias IEntries<T>

+
IEntries<T>: Iterable<[number, T]>
+

IEntries is a list of index-value pairs, with unique indices.

+
+
+

Type Parameters

+
    +
  • +

    T

+
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/types/ILists.html b/types/ILists.html new file mode 100644 index 000000000..7660cd37f --- /dev/null +++ b/types/ILists.html @@ -0,0 +1,310 @@ +ILists | extra-array
+
+ +
+
+
+
+ +

Type alias ILists<T>

+
ILists<T>: [Iterable<number>, Iterable<T>]
+

ILists is a pair of index iterable list and value iterable list, with unique indices.

+
+
+

Type Parameters

+
    +
  • +

    T

+
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/types/Lists.html b/types/Lists.html new file mode 100644 index 000000000..479eb8dbd --- /dev/null +++ b/types/Lists.html @@ -0,0 +1,310 @@ +Lists | extra-array
+
+ +
+
+
+
+ +

Type alias Lists<T>

+
Lists<T>: [number[], T[]]
+

Lists is a pair of index array and value array, with unique indices.

+
+
+

Type Parameters

+
    +
  • +

    T

+
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/types/MapFunction.html b/types/MapFunction.html new file mode 100644 index 000000000..826926a86 --- /dev/null +++ b/types/MapFunction.html @@ -0,0 +1,339 @@ +MapFunction | extra-array
+
+ +
+
+
+
+ +

Type alias MapFunction<T, U>

+
MapFunction<T, U>: ((v, i, x) => U)
+
+

Type Parameters

+
    +
  • +

    T

  • +
  • +

    U

+
+

Type declaration

+
    +
  • +
      +
    • (v, i, x): U
    • +
    • +

      Handle transformation of a value to another.

      +
      +
      +

      Parameters

      +
        +
      • +
        v: T
        +

        value in array

        +
        +
      • +
      • +
        i: number
        +

        index of value in array

        +
        +
      • +
      • +
        x: T[]
        +

        array containing the value

        +
        +
      +

      Returns U

      transformed value

      + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/types/ProcessFunction.html b/types/ProcessFunction.html new file mode 100644 index 000000000..b01f78cfc --- /dev/null +++ b/types/ProcessFunction.html @@ -0,0 +1,336 @@ +ProcessFunction | extra-array
+
+ +
+
+
+
+ +

Type alias ProcessFunction<T>

+
ProcessFunction<T>: ((v, i, x) => void)
+
+

Type Parameters

+
    +
  • +

    T

+
+

Type declaration

+
    +
  • +
      +
    • (v, i, x): void
    • +
    • +

      Handle processing of values in an array.

      +
      +
      +

      Parameters

      +
        +
      • +
        v: T
        +

        value in array

        +
        +
      • +
      • +
        i: number
        +

        index of value in array

        +
        +
      • +
      • +
        x: T[]
        +

        array containing the value

        +
        +
      +

      Returns void

      +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/types/ReadFunction.html b/types/ReadFunction.html new file mode 100644 index 000000000..0f0cdc4f1 --- /dev/null +++ b/types/ReadFunction.html @@ -0,0 +1,319 @@ +ReadFunction | extra-array
+
+ +
+
+
+
+ +

Type alias ReadFunction<T>

+
ReadFunction<T>: (() => T)
+
+

Type Parameters

+
    +
  • +

    T

+
+

Type declaration

+
    +
  • +
      +
    • (): T
    • +
    • +

      Handle reading of a single value.

      +
      +

      Returns T

      value

      + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/types/ReduceFunction.html b/types/ReduceFunction.html new file mode 100644 index 000000000..9b66e76fd --- /dev/null +++ b/types/ReduceFunction.html @@ -0,0 +1,344 @@ +ReduceFunction | extra-array
+
+ +
+
+
+
+ +

Type alias ReduceFunction<T, U>

+
ReduceFunction<T, U>: ((acc, v, i, x) => U)
+
+

Type Parameters

+
    +
  • +

    T

  • +
  • +

    U

+
+

Type declaration

+
    +
  • +
      +
    • (acc, v, i, x): U
    • +
    • +

      Handle reduction of multiple values into a single value.

      +
      +
      +

      Parameters

      +
        +
      • +
        acc: U
        +

        accumulator (temporary result)

        +
        +
      • +
      • +
        v: T
        +

        value in array

        +
        +
      • +
      • +
        i: number
        +

        index of value in array

        +
        +
      • +
      • +
        x: T[]
        +

        array containing the value

        +
        +
      +

      Returns U

      reduced value

      + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/types/SwapFunction.html b/types/SwapFunction.html new file mode 100644 index 000000000..56222d22d --- /dev/null +++ b/types/SwapFunction.html @@ -0,0 +1,337 @@ +SwapFunction | extra-array
+
+ +
+
+
+
+ +

Type alias SwapFunction<T>

+
SwapFunction<T>: ((x, i, j) => T[])
+
+

Type Parameters

+
    +
  • +

    T

+
+

Type declaration

+
    +
  • +
      +
    • (x, i, j): T[]
    • +
    • +

      Handle swapping of two values in an array.

      +
      +
      +

      Parameters

      +
        +
      • +
        x: T[]
        +

        an array (updated!)

        +
        +
      • +
      • +
        i: number
        +

        an index

        +
        +
      • +
      • +
        j: number
        +

        another index

        +
        +
      +

      Returns T[]

      x | x[i] ⇔ x[j]

      + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/types/TestFunction.html b/types/TestFunction.html new file mode 100644 index 000000000..a46126feb --- /dev/null +++ b/types/TestFunction.html @@ -0,0 +1,337 @@ +TestFunction | extra-array
+
+ +
+
+
+
+ +

Type alias TestFunction<T>

+
TestFunction<T>: ((v, i, x) => boolean)
+
+

Type Parameters

+
    +
  • +

    T

+
+

Type declaration

+
    +
  • +
      +
    • (v, i, x): boolean
    • +
    • +

      Handle selection of values in an array.

      +
      +
      +

      Parameters

      +
        +
      • +
        v: T
        +

        value in array

        +
        +
      • +
      • +
        i: number
        +

        index of value in array

        +
        +
      • +
      • +
        x: T[]
        +

        array containing the value

        +
        +
      +

      Returns boolean

      selected?

      + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/wiki b/wiki deleted file mode 160000 index 0caf36c65..000000000 --- a/wiki +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 0caf36c655611e0f475b10b68b1558e7b750b20d