UNPKG

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) 337 B
/** * Returns the prime factorization of a number as an array of prime factors. * For example, primeFactorization(60) returns [2, 2, 3, 5]. * @author @dailker * @param {number} n - The number to factorize. * @returns {number[]} An array of prime factors. */ export declare function primeFactorization(n: number): number[];