Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/isx/is_number.ts>isNumber

Collection of validation functions for JavaScript data
Latest
function isNumber
import { isNumber } from "https://deno.land/x/isx@1.5.0/is_number.ts";

Whether the input is number or not.

Examples

Example 1

import { isNumber } from "https://deno.land/x/isx@$VERSION/is_number.ts"
import { assertEquals } from "https://deno.land/std/testing/asserts.ts"
assertEquals(isNumber(1000), true)
assertEquals(isNumber('hello world'), false)

Parameters

input: unknown
  • Any input.

Returns

input is number