Skip to content

Commit

Permalink
docs: ✏️ 添加废弃声明
Browse files Browse the repository at this point in the history
  • Loading branch information
l246804 committed Dec 10, 2023
1 parent 021fd50 commit b0691c5
Showing 1 changed file with 20 additions and 22 deletions.
42 changes: 20 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,27 @@
# `@rhao/lodash-x`
# ~~@rhao/lodash-x~~

#### 介绍
> ***废弃声明:该包已被废弃,推荐使用 [`nice-fns`](https://www.npmjs.com/package/nice-fns),拥有完整的单测和文档,并实现和优化了该包所有功能!***
基于 `lodash` 扩展通用函数。
#### 迁移至指南

#### 安装教程
安装 `nice-fns`

- `CommonJS` 模块下使用 `lodash`
- `ESModule` 模块下使用 `lodash-es`

```bash
```shell
# npm
npm i lodash-es @rhao/lodash-x
# yarn | pnpm
pnpm add lodash-es @rhao/lodash-x
```

#### 使用说明
npm i nice-fns

```js
import { camelCase } from 'lodash-es'
import { bigCamelCase } from '@rhao/lodash-x'

const str = 'plain-text'

console.log(camelCase(str)) // plainText
console.log(bigCamelCase(str)) // PlainText
# yarn or pnpm
pnpm add nice-fns
```

函数迁移指南:

1. `assignOwnKeys` => `assignOwn`
2. `bigCamelCase` => `pascalCase`
3. `combineURLs` 支持多 `relativeURL`
4. `controllablePromise` => `promiseWithControl`
5. `createSwitch` 调用方式更改
6. `pauseableTimer` => `timerWithControl`
7. `safeJSONParse` => `parseJSON`
8. `setupDefaults` 被移除
9. `setupDefaults.treeOptions` => `treeDefaults`

0 comments on commit b0691c5

Please sign in to comment.