Exciting release!Introducing "safe npm". Learn more
Socket
Log inDemoInstall

colors-regex

Package Overview
Dependencies
0
Maintainers
1
Versions
2
Issues
File Explorer

Advanced tools

colors-regex

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

    2.0.0latest
    GitHub

Version published
Maintainers
1
Weekly downloads
1,024
increased by0.59%

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 installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install Socket
Socket
support@socket.devSocket SOC 2 Logo

Product

  • Package Issues
  • 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