🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

colors-regex

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

colors-regex

Regular expressions for rgb, rgba, hex, hexa, hsl & hsla colors

2.0.0
latest
Source
npm
Version published
Weekly downloads
4.8K
-55.47%
Maintainers
1
Weekly downloads
 
Created
Source

colors-regex

package version package downloads standard-readme compliant package license make a pull request

Regular expressions for rgb, rgba, hex, hexa, hsl & hsla colors

Table of Contents

Install

This project uses node and npm.

$ npm install colors-regex
$ # OR
$ yarn add colors-regex

Usage

const assert = require('assert')
const colorRegex = require('colors-regex')

assert(colorRegex.hex.strict.test('#000000')) // Success
assert(colorRegex.hex.strict.test('#2')) // Failure

Contribute

  • Fork it and create your feature branch: git checkout -b my-new-feature
  • Commit your changes: git commit -am 'Add some feature'
  • Push to the branch: git push origin my-new-feature
  • Submit a pull request

License

MIT

Keywords

regexp,

FAQs

Package last updated on 04 Jul 2018

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