# @anwhy/reselect-utils 中文文档

规范地址：https://npmcn.com/package/%40anwhy/reselect-utils/

版本：5\.1\.0-p7
npm 元数据更新时间：2024-06-11T15:49:22.854Z
中文译文更新时间：2026-11-06T07:41:40.471Z
软件包许可：未声明

本文由上游 README 翻译，可能存在偏差，请结合原文核对 API、命令与配置。版权与许可归原作者所有。

原始 npm 页面：https://www.npmjs.com/package/%40anwhy/reselect-utils
原文对照：https://npmcn.com/package/%40anwhy/reselect-utils/?lang=original

## 关键信息（来自 npm 元数据）

- 包体积（解压后）：243 kB，8 个文件
- 模块格式：ESM + CJS
- TypeScript 类型：包内自带
- 运行依赖：0 个
- peer 依赖：re-reselect ^5\.1\.0，react ^18\.3\.1，react-dom ^18\.3\.1，react-redux ^9\.1\.2，reselect ^5\.1\.0
- 首次发布：2024-06-11T15:49:22.267Z
- 最新版本发布：2024-06-11T15:49:22.592Z
- 近 30 天下载量：4723（2026-10-06 至 2026-11-04，npm 官方下载统计）
- 已发布版本数：1（近 12 个月 0 个）

## 中文简介

[![build status](https://img.shields.io/travis/com/sgrishchenko/reselect-utils/master.svg?style=flat-square)](https://travis-ci.com/sgrishchenko/reselect-utils) \[被覆盖状态\] ([https://img.shields.io/coveralls/sgrishchenko/reselect-utils/master.svg?st 页面存档备份,存于互联网档案馆](https://img.shields.io/coveralls/sgrishchenko/reselect-utils/master.svg?st)

## 安装

```sh
npm install @anwhy/reselect-utils
```

也可以使用：`pnpm add @anwhy/reselect-utils`、`yarn add @anwhy/reselect-utils`、`bun add @anwhy/reselect-utils`

## README

# [重新选择 Utils](https://sgrishchenko.github.io/reselect-utils/docz)

[![build status](https://img.shields.io/travis/com/sgrishchenko/reselect-utils/master.svg?style=flat-square)](https://travis-ci.com/sgrishchenko/reselect-utils) [![coverage status](https://img.shields.io/coveralls/sgrishchenko/reselect-utils/master.svg?style=flat-square)](https://coveralls.io/github/sgrishchenko/reselect-utils?branch=master) [![npm version](https://img.shields.io/npm/v/reselect-utils.svg?style=flat-square)](https://www.npmjs.com/package/reselect-utils) [![github license](https://img.shields.io/github/license/sgrishchenko/reselect-utils.svg?style=flat-square)](https://github.com/sgrishchenko/reselect-utils/blob/master/LICENSE)

## 安装

使用纱线或npm从国家预防机制存储器安装:

```shell
yarn add reselect-utils
```

```shell
npm install reselect-utils
```

## 动机

例如: [重新选择](https://github.com/reduxjs/reselect) 财务报告和审定财务报表 [重新选择](https://github.com/toomuchdesign/re-reselect) 尝试解决记忆的任务。 但对某些应用问题没有标准的解决办法。 这个图书馆的创建是为了努力系统地解决以下问题:

-   以可选对象作为选择的来源.
-   将参数选择器绑定在特定属性值上.
-   将参数选择器适应新的参数界面(可用于创建参数) [结构选择器](https://github.com/reduxjs/reselect#createstructuredselectorinputselectors-selectorcreator--createselector)) (中文(简体) ).
-   使用选择结果作为新选择的参数.
-   从选取结果集合中计算总值.
-   选择结果的结构安排(比较合适的 [结构选择器](https://github.com/reduxjs/reselect#createstructuredselectorinputselectors-selectorcreator--createselector) 财务报告和审定财务报表 [缓存结构选择器](https://github.com/toomuchdesign/re-reselect#createStructuredCachedSelector)) (中文(简体) ).
-   关键选择者组成(用于 [密钥选择器创建器](https://github.com/toomuchdesign/re-reselect#keyselectorcreator) (用法).

## 贷项

重选 Utils 时受工程的启发, 例如 [重新选择](https://github.com/reduxjs/reselect), (中文(简体) ), [重新选择](https://github.com/toomuchdesign/re-reselect) 财务报告和审定财务报表 [双链](https://github.com/rimeto/ts-optchain)。 。 。 . 这个库的设计也采用了功能编程原理. 譬如说, 链选择器 灵感来自莫纳德模式.

## 常见问题

### @anwhy/reselect-utils 是什么？

\[被覆盖状态\] \(https://img\.shields\.io/coveralls/sgrishchenko/reselect-utils/master\.svg?st 页面存档备份,存于互联网档案馆

### 如何安装 @anwhy/reselect-utils？

在项目目录运行 npm install @anwhy/reselect-utils，或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖：re-reselect（^5\.1\.0）、react（^18\.3\.1）、react-dom（^18\.3\.1）、react-redux（^9\.1\.2）、reselect（^5\.1\.0）。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖，Yarn 需要手动安装。

### @anwhy/reselect-utils 支持 TypeScript 吗？

支持。包内自带 TypeScript 类型声明（package\.json 声明了 types 入口），安装后即可获得类型提示，无需再安装 @types 包。

### @anwhy/reselect-utils 支持 ESM 还是 CommonJS？

同时提供 ES Module 与 CommonJS 入口，import 和 require\(\) 都可以使用，打包工具会自动选择合适的版本。

### @anwhy/reselect-utils 可以商用吗？

@anwhy/reselect-utils 使用 未声明 许可。package\.json 没有声明许可证。没有许可证的代码默认保留全部权利，商用前请联系作者或查看仓库中的 LICENSE 文件。以上为概括，不构成法律意见，请以许可原文为准。

### @anwhy/reselect-utils 的下载量有多少？

根据 npm 官方下载统计，@anwhy/reselect-utils 在 2026/10/06 – 2026/11/04 这 30 天内被下载 4,723 次，日均约 157 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入，适合横向比较热度，不能直接等同于使用人数。

### @anwhy/reselect-utils 还在维护吗？

最新版本 5\.1\.0-p7 发布于 2024/06/11（2 年前）；至今共发布 1 个版本，其中过去 12 个月发布了 0 个；首次发布于 2024/06/11。发布频率只是参考信号：功能稳定的工具可能很少需要更新，建议结合源码仓库的 issue 和提交记录判断。

