npm.io
4.0.4 • Published 2 years ago

@types/is-natural-number

Licence
MIT
Version
4.0.4
Deps
0
Size
3 kB
Vulns
0
Weekly
0
Stars
51.4K

Installation

npm install --save @types/is-natural-number

Summary

This package contains type definitions for is-natural-number (https://github.com/shinnn/is-natural-number.js).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/is-natural-number.

index.d.ts

interface Options {
    /**
     * Setting this option true makes 0 regarded as a natural number.
     */
    includeZero: boolean;
}

/**
 * Rreturns true if the first argument is one of the natural numbers.
 * If not, or the argument is not a number, it returns false.
 */
declare function isNaturalNumber(number: number | string, option?: Options): boolean;

export = isNaturalNumber;

Additional Details

  • Last updated: Tue, 07 Nov 2023 0337 GMT
  • Dependencies: none

Credits

These definitions were written by .