cc-tools-utils 0.0.2 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,6 +1,7 @@
1
- 一个由 chencheng)开发与维护的个人 JavaScript/Node.js 工具函数库,旨在为日常开发提供常用的、高质量的辅助工具。
1
+ 一个由 chencheng 开发与维护的个人工具函数库,旨在为日常开发提供常用的、高质量的辅助工具。
2
2
 
3
3
  ✨ 特性
4
+
4
5
  开箱即用:简单导入,无需复杂配置
5
6
 
6
7
  轻量无依赖:保持核心功能的纯净,不引入第三方依赖
@@ -9,4 +10,27 @@
9
10
 
10
11
  模块化:按需引入,支持 Tree Shaking
11
12
 
12
- 良好测试:核心功能均有单元测试覆盖
13
+ 良好测试:核心功能均有单元测试覆盖
14
+
15
+ ## 📦 安装
16
+
17
+ ```bash
18
+ npm install cc-tools-utils
19
+ # 或
20
+ yarn add cc-tools-utils
21
+ # 或
22
+ pnpm add cc-tools-utils
23
+ ```
24
+
25
+
26
+ ## 🚀 使用
27
+
28
+ ```javascript
29
+ import { cesiumHooks, tools } from 'cc-tools-utils';
30
+
31
+ // 使用 Cesium hooks
32
+ const { viewer } = cesiumHooks.initCesium('cesiumContainer');
33
+
34
+ // 使用工具函数
35
+ const debouncedFn = tools.debounce(300, () => console.log('debounced'));
36
+ ```
@@ -0,0 +1,3 @@
1
+ declare const imgUrlToBase64: (url: any, callback: any) => Promise<void>;
2
+ declare const downloadFile: (content: any, fileName: string) => void;
3
+ export { imgUrlToBase64, downloadFile };
package/dist/index.d.ts CHANGED
@@ -2,6 +2,7 @@ import * as img from "./lib/img/Transform";
2
2
  import * as js from "./lib/js/tools";
3
3
  import * as bus from "./lib/js/bus";
4
4
  import * as cesiumHooks from "./lib/js/cesiumHooks";
5
+ export { img, js, bus, cesiumHooks };
5
6
  declare const _default: {
6
7
  img: typeof img;
7
8
  js: typeof js;