@bundled-es-modules/chai

中文文档
4.3.7发布于 2023/01/24TypeScriptES Module零依赖近 30 天下载 3589

mirror of chai, bundled and exposed as ES module (incl. typescript types)

此软件包已被标记为弃用

Use chai v5 instead, which publishes native ESM now. This fork is vulnerable to prototype pollution.

原始使用文档
文档目录3 节
  1. Install
  2. Use
  3. Bower use

chai

This is a mirror of chai, bundled and exposed as ES module.

Install

npm install @bundled-es-modules/chai
bower install bundled-es-modules/chai

Use

<script type="module">
  import { chai, expect, should, assert } from '@bundles-es-modules/chai';
  // or directly
  import chai from '@bundles-es-modules/chai/chai.js';
</script>

Bower use

<script type="module">
  import { chai, expect, should, assert } from 'chai';
  // or directly
  import chai from 'chai/chai.js';
</script>

版本与发布记录

@bundled-es-modules/chai 共发布 5 个版本,首次发布于 2018/11/18;过去 12 个月发布了 0 个版本。

版本发布日期距今
4.3.7latest2023/01/243 年前
4.2.22019/08/157 年前
4.2.12019/01/307 年前
4.2.02018/11/197 年前
4.2.0-rc.12018/11/187 年前

关于 @bundled-es-modules/chai 的常见问题

@bundled-es-modules/chai 是什么?

mirror of chai, bundled and exposed as ES module (incl. typescript types)注意:该包已被作者标记为弃用——Use chai v5 instead, which publishes native ESM now. This fork is vulnerable to prototype pollution.

如何安装 @bundled-es-modules/chai?

在项目目录运行 npm install @bundled-es-modules/chai,或使用 pnpm add / yarn add / bun add。

@bundled-es-modules/chai 支持 TypeScript 吗?

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

@bundled-es-modules/chai 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@bundled-es-modules/chai 可以商用吗?

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

@bundled-es-modules/chai 的下载量有多少?

根据 npm 官方下载统计,@bundled-es-modules/chai 在 2026/10/09 – 2026/11/07 这 30 天内被下载 3,589 次,日均约 120 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@bundled-es-modules/chai 还在维护吗?

最新版本 4.3.7 发布于 2023/01/24(3 年前);至今共发布 5 个版本,其中过去 12 个月发布了 0 个;首次发布于 2018/11/18。作者已将其标记为弃用,新项目建议寻找替代方案。