Algorithm Tools are useful small algorithms packaged in a way that make it easy to re-use them in other Algorithms.
$ npm install algoritool
const algoritool = require("algoritool");
// Specific example:
const { ArrayManipulation } = require("algoritool");
const mySort = array => ArrayManipulation.clone(array).sort();
sequence: (len: any, from?: number) => number[]
toObject: (arr: any) => any;
chunksSplit: (arr: any, chunkSize: any) => any[]
clone: (arr: any) => any[]
empty: (arr: any) => any
permutations: (arr: any) => any
removeDuplicates: (arr: any) => any[]
shuffle: (arr: any) => any[]
byAttribute: (arr: any, attr: any, asc?: boolean) => any;
isArray: (value: any) => boolean;
repeat: (str: any, times: any) => string;