0.1.5 • Published 2 years 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
2 years ago
0.1.4
2 years ago
0.1.3
2 years ago
0.1.2
2 years ago
0.1.1
2 years ago
0.1.0
2 years ago
0.0.16
2 years ago
0.0.15
2 years ago
0.0.14
2 years ago
0.0.13
2 years ago
0.0.12
2 years ago
0.0.11
2 years ago
0.0.10
2 years ago
0.0.9
2 years ago
0.0.8
2 years ago
0.0.7
2 years ago
0.0.6
2 years ago
0.0.5
2 years ago
0.0.4
2 years ago
0.0.3
2 years ago
0.0.2
2 years ago
0.0.1
2 years ago