Installations
npm install is-hexcolor
Developer Guide
Typescript
No
Module System
CommonJS
Node Version
2.0.0
NPM Version
2.10.0
Score
75.2
Supply Chain
99.4
Quality
77.1
Maintenance
100
Vulnerability
100
License
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (100%)
Developer
Download Statistics
Total Downloads
776,510
Last Day
483
Last Week
2,593
Last Month
15,040
Last Year
155,354
GitHub Statistics
2 Stars
5 Commits
3 Watching
1 Branches
1 Contributors
Bundle Size
384.00 B
Minified
237.00 B
Minified + Gzipped
Package Meta Information
Latest Version
1.0.0
Package Id
is-hexcolor@1.0.0
Size
4.10 kB
NPM Version
2.10.0
Node Version
2.0.0
Total Downloads
Cumulative downloads
Total Downloads
776,510
Last day
-22.2%
483
Compared to previous day
Last week
-30.3%
2,593
Compared to previous week
Last month
-17.5%
15,040
Compared to previous month
Last year
6.1%
155,354
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
1
Dev Dependencies
1
is-hexcolor
![The MIT License](https://img.shields.io/badge/license-MIT-blue.svg)
Check that given value is valid hex color, using
hex-color-regex
- the best regex for matching hex color values
Install
npm i is-hexcolor --save
npm test
Usage
For more use-cases see the tests
1var isHexcolor = require('is-hexcolor') 2 3isHexcolor('#ffffff') //=> true 4isHexcolor('#fff') //=> true 5 6isHexcolor('fff') //=> false 7isHexcolor('#9gg') //=> false 8isHexcolor('#abcZZZ') //=> false 9isHexcolor('#3333') //=> false 10isHexcolor('#44445555') //=> false 11isHexcolor('foo bar') //=> false 12isHexcolor('foo #fff bar') //=> false 13isHexcolor('foo #f3f3f3 bar') //=> false
Related
- 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
![freenode #charlike](https://img.shields.io/badge/freenode-%23charlike-5654a4.svg)
![Empty State](/_next/static/media/empty.e5fae2e5.png)
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
- Info: project has a license file: LICENSE.md:0
- Info: FSF or OSI recognized license: MIT License: LICENSE.md:0
Reason
security policy file detected
Details
- Info: security policy file detected: github.com/tunnckoCore/.github/SECURITY.md:1
- Info: Found linked content: github.com/tunnckoCore/.github/SECURITY.md:1
- Info: Found disclosure, vulnerability, and/or timelines in security policy: github.com/tunnckoCore/.github/SECURITY.md:1
- Info: Found text in security policy: github.com/tunnckoCore/.github/SECURITY.md:1
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/5 approved changesets -- score normalized to 0
Reason
no SAST tool detected
Details
- Warn: no pull requests merged into dev branch
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Score
3.9
/10
Last Scanned on 2025-01-20
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More