A collection of utility functions like common Math functions and common iterator operations written in TypeScript. This library supports tree shaking when used with build tools which support it.
npm install goodish
Read the docs for a complete list of provided functions.
All randomized functions in goodish are seedable
A collection of common math functions with min/max support such as random(min, max) and randomInt(min, max). These
functions use Math.random by default for number generation, but can be seeded using the setSeed(someNumber) method.
Setting the seed will affect all of the functions in this library which rely on the RNG. Use clearSeed to reset back
to the default Math.random PRNG.
A collection of common methods performed on arrays such as range(min, max, step), shuffle(arr), randomFrom(arr),
permutationsOf(arr), combinationsOf(arr, n) and swap(arr, indexA, indexB).
Code contributions are welcome.
npm installnpm run test and then confirm all tests have passedGenerated using TypeDoc