extarray
v0.1.1
Published
Useful Array Extension
Downloads
2
Maintainers
Readme
Extarray.js
Highlight
Useful features not found in Array
Covers existing Array functions
Supports Typescript
Install
npm install extarray
Usage
//cjs
const { Extarray } = require('extarray');
//esm or ts
import { Extarray } from 'extarray';
//from constructor
const extarray = new Extarray(0, 1, 2, 3, 4);
//from existing array
const array = [0, 1, 2, 3, 4];
const extarray = Extarray.extend(array);
//shuffle
extarray.shuffle();
console.log(extarray); //<Extarray>[1, 3, 4, 0, 2]
//draw
console.log(extarray.draw()); // 3
console.log(extarray); //<Extarray>[0, 1, 2, 4]
//...more methods
Document
For more information, please see document
Issues
If you find a bug or problem, please open an issue!:bug:
Author
- Github: airRnot1106
- NPM: airrnot1106
- Twitter: @airRnot1106
LICENSE
This project is licensed under the MIT License - see the LICENSE file for details.