@-xun/debug

中文文档
2.0.2发布于 2025/08/26MITTypeScriptCommonJS近 30 天下载 31.1万

Extends the hyper-popular debug package with several convenience methods

原始使用文档
文档目录7 节
  1. Install
  2. Usage
  3. Appendix
  4. Published Package Details
  5. License
  6. Contributing and Support
  7. Contributors

Extends the hyper-popular debug package with several convenience methods


Black Lives Matter! Last commit timestamp Codecov Source license Uses Semantic Release!

NPM version Monthly Downloads


@-xun/debug

@-xun/debug extends debugger instances from the hyper popular debug package with several convenience methods.

This package is the workhorse on which rejoinder is built.



Install

To install:

npm install @-xun/debug

Usage

[!TIP]

This is a low-level package. You probably want rejoinder instead.

@-xun/debug, as a wrapper around the debug package, also shares all of its features; see debug's documentation for details.

TODO: document the new features enabled by @-xun/debug that debug lacks (for now, see docs/).

Appendix

Further documentation can be found under docs/.

Published Package Details

This is a CJS2 package with statically-analyzable exports built by Babel for use in Node.js versions that are not end-of-life. For TypeScript users, this package supports both "Node10" and "Node16" module resolution strategies.

Expand details

That means both CJS2 (via require(...)) and ESM (via import { ... } from ... or await import(...)) source will load this package from the same entry points when using Node. This has several benefits, the foremost being: less code shipped/smaller package size, avoiding dual package hazard entirely, distributables are not packed/bundled/uglified, a drastically less complex build process, and CJS consumers aren't shafted.

Each entry point (i.e. ENTRY) in package.json's exports[ENTRY] object includes one or more export conditions. These entries may or may not include: an exports[ENTRY].types condition pointing to a type declaration file for TypeScript and IDEs, a exports[ENTRY].module condition pointing to (usually ESM) source for Webpack/Rollup, a exports[ENTRY].node and/or exports[ENTRY].default condition pointing to (usually CJS2) source for Node.js require/import and for browsers and other environments, and other conditions not enumerated here. Check the package.json file to see which export conditions are supported.

Note that, regardless of the { "type": "..." } specified in package.json, any JavaScript files written in ESM syntax (including distributables) will always have the .mjs extension. Note also that package.json may include the sideEffects key, which is almost always false for optimal tree shaking where appropriate.

License

See LICENSE.

Contributing and Support

New issues and pull requests are always welcome and greatly appreciated! 🤩 Just as well, you can star 🌟 this project to let me know you found it useful! ✊🏿 Or buy me a beer, I'd appreciate it. Thank you!

See CONTRIBUTING.md and SUPPORT.md for more information.

Contributors

See the table of contributors.

版本与发布记录

@-xun/debug 共发布 13 个版本,首次发布于 2025/01/09;过去 12 个月发布了 0 个版本。

版本发布日期距今
2.0.2latest2025/08/261.2 年前
2.0.12025/06/141.4 年前
2.0.02025/06/141.4 年前
1.1.42025/02/211.7 年前
1.1.32025/01/251.8 年前
1.1.22025/01/251.8 年前

关于 @-xun/debug 的常见问题

@-xun/debug 是什么?

Extends the hyper-popular debug package with several convenience methods

如何安装 @-xun/debug?

在项目目录运行 npm install @-xun/debug,或使用 pnpm add / yarn add / bun add。

@-xun/debug 支持 TypeScript 吗?

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

@-xun/debug 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@-xun/debug 需要什么版本的 Node.js?

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

@-xun/debug 可以商用吗?

@-xun/debug 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@-xun/debug 的下载量有多少?

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

@-xun/debug 还在维护吗?

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