Socket
Socket
Sign inDemoInstall

is-hexcolor

Package Overview
Dependencies
1
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    is-hexcolor

Check that given value is valid hex color, using `hex-color-regex` - the best regex for matching hex color values


Version published
Weekly downloads
2.6K
decreased by-5.49%
Maintainers
1
Install size
31.3 kB
Created
Weekly downloads
 

Changelog

Source

1.0.0 - 2015-06-01

  • Release v1.0.0 / npm@v1.0.0
  • fix dependency range
  • add keywords
  • implement :star2:

Readme

Source

is-hexcolor npmjs.com The MIT License

Check that given value is valid hex color, using hex-color-regex - the best regex for matching hex color values

code climate standard code style travis build status coverage status dependency status

Install

npm i is-hexcolor --save
npm test

Usage

For more use-cases see the tests

var isHexcolor = require('is-hexcolor')

isHexcolor('#ffffff') //=> true
isHexcolor('#fff') //=> true

isHexcolor('fff') //=> false
isHexcolor('#9gg') //=> false
isHexcolor('#abcZZZ') //=> false
isHexcolor('#3333') //=> false
isHexcolor('#44445555') //=> false
isHexcolor('foo bar') //=> false
isHexcolor('foo #fff bar') //=> false
isHexcolor('foo #f3f3f3 bar') //=> false
  • copyright-regex: Regex for matching and parsing copyright statements.
  • github-short-url-regex: Regular expression (Regex) for matching github shorthand (user/repo#branch).
  • hex-color-regex: The best regular expression (regex) for matching hex color values from string.
  • mentions-regex: 100% twitter compatible @mentions regex! Regular expression for matching @username mentions, as used on twitter, facebook, github, etc.
  • todo-regex: Regular expression for matching TODO statements in a string.

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
But before doing anything, please read the CONTRIBUTING.md guidelines.

Charlike Make Reagent new message to charlike freenode #charlike

tunnckocore.tk keybase tunnckocore tunnckoCore npm tunnckoCore twitter tunnckoCore github

Keywords

FAQs

Last updated on 01 Jun 2015

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