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

x/iterange/deps.ts>isNumber

Numeric sequence lazy generator, TC39 proposal-iterator.range implementation
Latest
function isNumber
import { isNumber } from "https://deno.land/x/iterange@1.0.0/deps.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