Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

xcn

earthnutDev145ISC1.0.0TypeScript support: included

一个用于字符串拼接的小工具,常用于 class name 的拼接

xcn, mix-cn

readme

xcn

version issues 提交

xcn = mix + class name 组装 html 元素的 class 属性值,xcn 仅是 mix-cn 的缩写。

安装

npm install --save xcn@latest
# 或者
npm install --save mix-cn@latest

使用

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/

changelog

xcn

v1.0.0 (2025-8-31)

本来是想来添加去重功能的,发现之前就有该功能。那就升级下版本号吧

v0.1.3 (2025-8-17)

  • 导出了使用类型

v0.1.2 (2025-7-30)

  • 整理文档

v0.1.2-alpha.0 (2025-7-25)

  • 么事

v0.1.1 (2025-6-17)

  • 么事

0.1.0 (4 月 13 日 2025 年)

  • 嗯。没啥

0.0.2 (3 月 1 日 2025 年)

  • 可传入 ()=> string 类型的参数

0.0.1 (3 月 1 日 2025 年)

  • 修复了一些 bug

0.0.0 (2 月 19 日 2025 年)

  • 初始化项目