Socket
Socket
Sign inDemoInstall

colors-regex

Package Overview
Dependencies
0
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

colors-regex

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


Version published
Maintainers
1
Weekly downloads
797
decreased by-56.23%

Weekly downloads

Readme

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

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

License

MIT

Keywords

FAQs

Last updated on 04 Jul 2018

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc