has-a-digit

1.0.1 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i has-a-digit

Weekly Downloads

153

Version

1.0.1

License

MIT

Unpacked Size

8.03 kB

Total Files

6

Last publish

Collaborators

  • jaebradley