xcn
Version:
一个用于字符串拼接的小工具,常用于 class name 的拼接
34 lines (19 loc) • 758 B
Markdown
# xcn
[&label=版本号&labelColor=rgb(73,73,228)&color=rgb(0,0,0)>)](https://www.npmjs.com/package/xcn) [?logo=github>)](https://github.com/earthnutDev/xcn/issues)
`xcn = mix + class name` 组装 html 元素的 class 属性值,`xcn` 仅是 `mix-cn` 的缩写。
## 安装
```sh
npm install --save xcn@latest
# 或者
npm install --save mix-cn@latest
```
## 使用
```ts
import { xcn } from 'xcn';
> xcn('a' , 'b' ,'c');
'a b c'
> xcn('a', { c: false }, true , false ,null , {d: true}, 'b');
'a b d'
```
## 文档地址
参看 [https://earthnut.dev/npm/xcn/](https://earthnut.dev/npm/xcn/)