everyutil
Version:
A comprehensive library of lightweight, reusable utility functions for JavaScript and TypeScript, designed to streamline common programming tasks such as string manipulation, array processing, date handling, and more.
9 lines (8 loc) • 391 B
TypeScript
/**
* Normalizes an array of numbers using min-max or z-score normalization.
* @author @dailker
* @param {number[]} numbers - The array of numbers to normalize.
* @param {'minmax'|'zscore'} [method='minmax'] - The normalization method.
* @returns {number[]} The normalized array.
*/
export declare function normalize(numbers: number[], method?: 'minmax' | 'zscore'): number[];