Socket
Socket
Sign inDemoInstall

hsl-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

hsl-regex

Regex for matching HSL colors.


Version published
Maintainers
1
Created

What is hsl-regex?

The hsl-regex package provides a regular expression specifically designed to match HSL (Hue, Saturation, Lightness) color codes in strings. This can be particularly useful for validating and extracting HSL color values from text content in web development and software projects that deal with color data.

What are hsl-regex's main functionalities?

HSL Color Matching

This feature allows you to match HSL color values within a string. The provided code sample demonstrates how to use the hsl-regex package to find HSL values in a CSS style declaration.

const hslRegex = require('hsl-regex');
const text = 'background-color: hsl(210, 50%, 50%);';
const matches = text.match(hslRegex());
console.log(matches);

Other packages similar to hsl-regex

Keywords

FAQs

Package last updated on 30 Jan 2015

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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc