1.0.1 • Published 5 years ago
has-a-digit v1.0.1
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