Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

ishex

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ishex

Tells you if a string is a valid hexadecimal number.

latest
Source
npmnpm
Version
2.1.0
Version published
Weekly downloads
10
Maintainers
1
Weekly downloads
 
Created
Source

isHex

Usage

import { isHex, isHexColor } from isHex; // ES6
// var IsHex = require('isHex'); // ES5

console.log(isHex("FFF")); // returns true
console.log(isHexColor("#FFFFFF")); // returns true
console.log(isHexColor("FFFFFF")); // returns true
console.log(isHex("FGF")); // returns false

Keywords

ishex

FAQs

Package last updated on 22 Feb 2017

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