@@ -5,7 +5,7 @@
|
||||
## 安装
|
||||
|
||||
```bash
|
||||
npm install windychen-untils
|
||||
npm install windychen-utils
|
||||
```
|
||||
|
||||
## 使用
|
||||
@@ -13,7 +13,7 @@ npm install windychen-untils
|
||||
### Node.js / Bun.js
|
||||
|
||||
```javascript
|
||||
require('windychen-untils');
|
||||
require('windychen-utils');
|
||||
|
||||
// Object 扩展
|
||||
const obj = { a: { b: { c: 1 } } };
|
||||
@@ -33,7 +33,7 @@ obj.setPro('x.y.z', 'hello');
|
||||
### ES Module
|
||||
|
||||
```javascript
|
||||
import from 'windychen-untils/dist/windychen-utils.esm.js';
|
||||
import from 'windychen-utils/dist/windychen-utils.esm.js';
|
||||
```
|
||||
|
||||
## API 参考
|
||||
@@ -80,7 +80,7 @@ arr.findPro(item => item.id > 1);
|
||||
- 仅支持 localStorage → 使用 `ILocalStorage`(内存缓存)
|
||||
|
||||
```javascript
|
||||
import storage from 'windychen-untils';
|
||||
import storage from 'windychen-utils';
|
||||
|
||||
await storage.set('key', { data: 123 });
|
||||
await storage.get('key', null); // { data: 123 }
|
||||
|
||||
Reference in New Issue
Block a user