
Security News
NIST Officially Stops Enriching Most CVEs as Vulnerability Volume Skyrockets
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.
A simple helper function to merge class names using clsx and tailwind-merge.
In many projects, developers often need to combine class names conditionally and ensure that Tailwind CSS classes are merged correctly. Instead of copying the same utility function from project to project, this library was published to provide a reusable, easy-to-install solution. It simplifies the process of merging class names, making your code cleaner and more maintainable.
Install the package via npm:
npm install cn-func
import { cn } from "cn-func";
const className = cn("text-sm", "block", condition && "rounded");
// Output classes:
// text-sm block rounded (if condition is true)
This package uses the following libraries under the hood:
clsx: A tiny utility for constructing className strings conditionally.
tailwind-merge: A utility for merging Tailwind CSS classes in a predictable manner.
This project is licensed under the CC0 1.0 Universal (CC0 1.0) Public Domain Dedication. You can see the license here.
FAQs
A simple helper function to merge class names using clsx and tailwind-merge.
We found that cn-func demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.

Security News
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.