@bigbinary/neeto-cist

中文文档
1.0.17发布于 2025/05/10apache-2.0TypeScriptESM + CJS零依赖近 30 天下载 15万

A package encapsulating common utility functions used across neeto products

原始使用文档
文档目录5 节
  1. Contents
  2. Installation
  3. Usage
  4. Available functions
  5. Development

neeto-cist

BuildStatus

A collection of common utility functions used across all our neeto products. Try out the utility functions live at neetoCommons REPL.

Contents

Installation

Install from npm:

yarn add @bigbinary/neeto-cist@latest

Install the peer dependencies:

yarn add ramda

Usage

You can import all functions from @bigbinary/neeto-cist.

import { slugify } from "@bigbinary/neeto-cist";

Exports several general utility functions that are used throughout neeto products. The functions are structured in a manner reminiscent of Ramda, enabling seamless interoperability among them.

Pure functions were designed to be fail fast. If you call findById(10, null), it will throw error saying that it can't iterate through null.

But for most such pure functions, there is a failsafe alternative available. The failsafe alternative function will be prefixed with _. Example: _findById(10, null) returns null, _findById(10, undefined) returns undefined and _findById(10, [{ id: 10 }]) returns { id: 10 }.

Available functions

Array operations

Object operations

String operations

General utility functions



Development

版本与发布记录

@bigbinary/neeto-cist 共发布 19 个版本,首次发布于 2023/09/22;过去 12 个月发布了 0 个版本。

版本发布日期距今
1.0.17latest2025/05/101.5 年前
1.0.152025/02/171.7 年前
1.0.142024/12/031.9 年前
1.0.132024/10/112 年前
1.1.0-beta2beta2024/09/192 年前
1.1.0-beta12024/09/192 年前

关于 @bigbinary/neeto-cist 的常见问题

@bigbinary/neeto-cist 是什么?

A package encapsulating common utility functions used across neeto products

如何安装 @bigbinary/neeto-cist?

在项目目录运行 npm install @bigbinary/neeto-cist,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:ramda(^0.29.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。它还提供命令行工具 dead-code-eliminator、remove-unused-translation-keys,可以用 npx dead-code-eliminator 直接运行。

@bigbinary/neeto-cist 支持 TypeScript 吗?

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

@bigbinary/neeto-cist 支持 ESM 还是 CommonJS?

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

@bigbinary/neeto-cist 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=22.13。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@bigbinary/neeto-cist 可以商用吗?

@bigbinary/neeto-cist 使用 apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@bigbinary/neeto-cist 的下载量有多少?

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

@bigbinary/neeto-cist 还在维护吗?

最新版本 1.0.17 发布于 2025/05/10(1.5 年前);至今共发布 19 个版本,其中过去 12 个月发布了 0 个;首次发布于 2023/09/22。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。