Package Exports
- algoritool
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (algoritool) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
algoritool - tech tools for algorithm design
Introduction
Algorithm Tools are useful small algorithms packaged in a way that make it easy to re-use them in other Algorithms.
Install
$ npm install algoritoolUsage
const algoritool = require("algoritool");
// Specific example:
const { ArrayManipulation } = require("algoritool");
const mySort = array => ArrayManipulation.clone(array).sort();Methods
Array Creation
sequence: (len: any, from?: number) => number[]Array Conversion
toObject: (arr: any) => any;Array Manipulation
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[]Array Sorting
byAttribute: (arr: any, attr: any, asc?: boolean) => any;Array Validation
isArray: (value: any) => boolean;String Manipulation
repeat: (str: any, times: any) => string;