@bemoje/is-numeric-string

Determine whether a value is a numeric string.

Usage no npm install needed!

<script type="module">
  import bemojeIsNumericString from 'https://cdn.skypack.dev/@bemoje/is-numeric-string';
</script>

README

@bemoje/is-numeric-string

Determine whether a value is a numeric string.

Version

NPM version

Travis CI

dependencies

Dependencies

dependencies

Stats

NPM downloads Forks

Donate

Buy Me A Beer donate button PayPal donate button

Installation

npm install @bemoje/is-numeric-string
npm install --save @bemoje/is-numeric-string
npm install --save-dev @bemoje/is-numeric-string

Usage


import isNumericString from '@bemoje/is-numeric-string'

isNumericString('.5')
//=> true

isNumericString('0.5')
//=> true

isNumericString('12')
//=> true

isNumericString('0')
//=> true

isNumericString('a')
//=> false

isNumericString(25)
//=> false

isNumericString(Inifnity.toString())
//=> false

isNumericString(NaN.toString())
//=> false

Tests

Uses Jest to test module functionality. Run tests to get coverage details.

npm run test

API

Table of Contents

isNumericString

Determine whether a value is a numeric string.

Parameters
  • value any The value

Returns boolean