Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/isx/number/is_positive_integer.ts>isPositiveInteger

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

Whether the input is positive integer or not.

Examples

Example 1

import { isPositiveInteger } from "https://deno.land/x/isx@$VERSION/number/is_positive_integer.ts";
import { assertEquals } from "https://deno.land/std/testing/asserts.ts";
assertEquals(isPositiveInteger(1), true);
assertEquals(isPositiveInteger(0), false);

Parameters

input: number
  • Any number.

Returns

boolean