@afoot/sorted-array
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

sorted array

A configurable JavaScript module to maintain a sorted, private array.

installation

Sorted Array can be used as an npm package or download the package and use it as an ESM module right in the browser.

documentation

View full documentation and examples at https://niftinessafoot.github.io/sorted-array/

example

Sorted Array takes either an array of existing data or a config object.

import { SortedArray } from '@afoot/sorted-array/';

const sortedArray = new SortedArray([5, 2, 3]);

sortedArray.log; // returns [2,3,5]

You can add, edit, and delete from the instance.

import { SortedArray } from '@afoot/sorted-array/';

const sortedArray = new SortedArray([5, 2, 3]);
sortedArray.add('1');

sortedArray.log; // returns [1,2,3,5]

license

MIT © Matthew Smith

made with ❤️ and ☕️ by

Niftiness Afoot! Matthew Smith

/@afoot/sorted-array/

    Package Sidebar

    Install

    npm i @afoot/sorted-array

    Weekly Downloads

    4

    Version

    1.0.2

    License

    MIT

    Unpacked Size

    17.4 kB

    Total Files

    7

    Last publish

    Collaborators

    • niftinessafoot