Licence
MIT
Version
1.0.1
Deps
0
Size
8 kB
Vulns
0
Weekly
0
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