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

isPrime

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

Test if a given number is prime or not Warning: O(n) algorithm

function isPrime<T extends number | bigint>(int: T): boolean;
§
isPrime<T extends number | bigint>(int: T): boolean
[src]

§Type Parameters

§
T extends number | bigint
[src]

§Parameters

§
int: T
[src]
  • The number to check if it's prime

§Return Type

§
boolean
[src]

Check result