@clarketm/superarray

1.2.32 • Public • Published

Array

NPM release

Array with superpowers! 💪

This data structure inherit all methods and properties from the Array built-in.

Individual Module Installation

Yarn

$ yarn add @clarketm/superarray

Npm

$ npm install @clarketm/superarray --save

API

constructor(iterable: Iterable)

Construct a Array

flatMap(callback: Callback): Array

Maps each element using a mapping function, then flattens the result into a new array

Name Type Attribute Description
callback Callback callback function

flat(depth: number): Array

Creates a new array with all sub-array elements concatenated into it recursively up to the specified depth

Name Type Attribute Description
depth number flatten depth

bubbleSort(comparator: Comparator): Array

Sort using bubble sort

Name Type Attribute Description
comparator Comparator comparator function

insertionSort(comparator: Comparator): Array

Sort using insertion sort

Name Type Attribute Description
comparator Comparator comparator function

mergeSort(comparator: Comparator): Array

Sort using merge sort

Name Type Attribute Description
comparator Comparator comparator function

quickSort(comparator: Comparator): Array

Sort using quick sort

Name Type Attribute Description
comparator Comparator comparator function

selectionSort(comparator: Comparator): Array

Sort using selection sort

Name Type Attribute Description
comparator Comparator comparator function

Package Sidebar

Install

npm i @clarketm/superarray

Weekly Downloads

9

Version

1.2.32

License

MIT

Unpacked Size

28.3 kB

Total Files

6

Last publish

Collaborators

  • clarketm