random-pie
Version:
A lightweight TypeScript/JavaScript library providing Python-style random number generation and randomization utilities. This utility module implements the most common functions from Python's random module, making it intuitive for Python developers workin
10 lines (9 loc) • 314 B
TypeScript
/**
* Calculates the cumulative sum of an array
* @param arr The input array of numbers
* @returns An array of cumulative sums
* @throws TypeError if the argument is not an array
* @throws RangeError if the input array is empty
*/
declare function accumulate(arr: number[]): number[];
export { accumulate };