1.0.1 • Published 5 months ago

cls-merge v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

Cls-Merge

A utility for constructing className strings conditionally.

Install

$ npm install cls-merge

Usage

import clsMerge from "cls-merge";

clsMerge("hoge", true && "fuga", "piyo");
// result: "hoge fuga piyo"

clsMerge(["hoge", "fuga", "piyo"]);
// result: "hoge fuga piyo"

clsMerge("hoge", ["fuga", ["piyo"]], "foo", "bar", true ? null : "baz");
// result: "hoge fuga piyo foo bar"
1.0.1

5 months ago

1.0.0

5 months ago

0.1.0

5 months ago