0.1.5 • Published 7 months ago
@iot9x.com/ipc-utils v0.1.5
描述
九星云、九星小程序、九星配置工具所共用的库方法。
特殊说明
- 由于考虑到小程序,所以不要支持
Buffer
,所以Buffer
部分全部使用Int8Array
来代替。
如何使用
$ pnpm add @iot9x.com/ipc-utils
import {
RegularUtil,
ConversionUtil,
dataFormatUtil
} from '@iot9x.com/ipc-utils'
// 检查是否为空
RegularUtil.isEmpty(null); // true
RegularUtil.isEmpty({}); // true
RegularUtil.isEmpty([]); // true
// 进制转换
ConversionUtil.hexToStr('31 32 33'); // 123
ConversionUtil.strToHex('123'); // 313233
ConversionUtil.strToHex('123', true); // 31 32 33
// 时间日期转换
dataFormatUtil.formatDate(Date.now()); // 2023-09-07 16:46:22
dataFormatUtil.formatHms(Date.now()); // 16:46:22
0.1.5
7 months ago
0.1.4
7 months ago
0.1.3
8 months ago
0.1.2
8 months ago
0.1.1
8 months ago
0.1.0
8 months ago
0.0.16
8 months ago
0.0.15
8 months ago
0.0.14
8 months ago
0.0.13
8 months ago
0.0.12
8 months ago
0.0.11
8 months ago
0.0.10
8 months ago
0.0.9
8 months ago
0.0.8
8 months ago
0.0.7
8 months ago
0.0.6
8 months ago
0.0.5
8 months ago
0.0.4
8 months ago
0.0.3
8 months ago
0.0.2
8 months ago
0.0.1
9 months ago