1.0.1 • Published 4 years ago

has-a-digit v1.0.1

Weekly downloads
176
License
MIT
Repository
github
Last release
4 years ago

Greenkeeper badge Build Status codecov npm npm

has-a-digit

Check if an input has a digit.

Installation

npm install has-a-digit
yarn add has-a-digit

Usage

import hasADigit from 'has-a-digit';

hasADigit(1); // true
hasADigit(1.23); // true
hasADigit(Infinity); // false
hasADigit(NaN); // false
hasADigit({}); // false
hasADigit(true); // false

hasADigit('1'); // true
hasADigit('1.23'); // true
hasADigit('abc123'); // true