npm

Bring the best of OSS JavaScript development to your projects with npm Orgs - private packages & team management tools.Learn more »

is-hex

1.1.3 • Public • Published

is-hex Build Status js-standard-style

Check if a string is a valid hexadecimal number.

Installation

$ npm install is-hex

Tests:

$ npm test

Usage

const isHex = require('is-hex')
 
isHex('08f67a') // true
isHex('08-f67a') // false
isHex('ffffffx') // false
isHex({}) // false
isHex([]) // false
isHex(88) // false
isHex(true) // false
isHex('0192') // true

License

MIT

install

npm i is-hex

Downloadsweekly downloads

383

version

1.1.3

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability