UNPKG

@huggingface/tokenizers

Version:

🤗 Tokenizers.js: A pure JS/TS implementation of today's most used tokenizers

8 lines (7 loc) • 301 B
/** * Returns the value and index of the minimum element in an array. * @param arr array of numbers. * @returns the value and index of the minimum element, of the form: [valueOfMin, indexOfMin] * @throws {Error} If array is empty. */ export declare function min(arr: number[]): [number, number];