Utils
Collections
This package contains a collection of utility functions to manipulate abstract collections
Collection.range
range(from: number, to: number) => number[]
Creates a numeric range:
Collection.rotate
rotate(times: number, collection: any[]) => any[]
Rotate an collection a number of times:
Collection.shuffle
shuffle(collection: any[]) => any[]
Randomizes the order of the specified collection in-place, using the Fisher–Yates shuffle.
Collection.permutations
permutations(collection: any[]) => any[][]
Get all permutations of an collection