Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

factors

import { factors } from "https://raw.githubusercontent.com/JOTSR/Denum/master/mod.ts";

It takes a number and returns a map of the prime factors of that number and the number of times they occur

function factors<T extends number | bigint>(n: T): Map<T, T>;
§
factors<T extends number | bigint>(n: T): Map<T, T>
[src]

§Type Parameters

§
T extends number | bigint
[src]

§Parameters

§
n: T
[src]
  • The number to factorize

§Return Type

§
Map<T, T>
[src]

A Map of factors and their count.