1.0.1 • Published 5 years ago

@gothbarbie/data-type-tool-belt v1.0.1

Weekly downloads
1
License
ISC
Repository
github
Last release
5 years ago

Data Type Tool Belt

Installation

npm i @gothbarbie/data-type-tool-belt

Usage

const { isNumber } = require('@gothbarbie/data-type-tool-belt')

// returns true
const result = isNumber('0123456')

// returns false
const result = isNumber('0123 456')

String

isNumber

  • Returns true if a string contains only digits.
  • Returns false if it contains anything else (including spaces).