Socket
Book a DemoInstallSign in
Socket

has-a-digit

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

has-a-digit

Validates if an input has a digit

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

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

Keywords

digit

FAQs

Package last updated on 14 Feb 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts