
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.