• Check if a number is prime

    Parameters

    • input: number

    Returns boolean

    Example

    import { number } from "@rjweb/utils"

    number.prime(5) // true
    number.prime(10) // false

    Since

    1.12.17

    Supports

    nodejs, browser