Skip to main content

isPositiveNumber

Detect whether a number is positive.

API

function isPositiveNumber(value: any): value is number;

Example

import { isPositiveNumber } from "@lilib/utils";

isPositiveNumber(1);
// => true

isPositiveNumber(0);
// => false

isPositiveNumber(-1);
// => false