@blinkk/degu

中文文档
3.2.1发布于 2024/04/09MITTypeScriptES Module零依赖近 30 天下载 4671

A general utility library for interactive websites, with a focus on performance.

原始使用文档
文档目录8 节
  1. Motivation
  2. Installation
  3. Getting started
  4. ThreeJS deps
  5. Browser compatibility
  6. Upgrading
  7. Contributing
  8. License

Degu

NPM Version GitHub Actions Dependency Status Known Vulnerabilities codecov

A general utility library for interactive websites, with a focus on performance.

Motivation

degu is an interactive developer toolbox. It is not the next buzzword-filled, huge component library with ready-made UI solutions (such as modals, carousels, etc.) but it aims to provide the "hammer and nails" needed to build highly-interactive, performant, kickass websites.

Installation

npm install @blinkk/degu@latest --save-dev

Getting started

Import the library:

import {WebWorker} from '@blinkk/degu';

const worker = new WebWorker((params)=> {
    return params.a * params.b;
})

worker.run({a: 5, b: 2}).then((result)=> {
   console.log(result); // 10
})

Import specific files:

import * as mathf from '@blinkk/degu/lib/mathf/mathf.js'
import * as is from '@blinkk/degu/lib/is/is.js'
import * as dom from '@blinkk/degu/lib/dom/dom.js';

ThreeJS deps

Classes under threef require three.js deps. Currently supports r110.

npm install --save-dev [email protected]
npm install --save-dev @types/[email protected]

Browser compatibility

degu supports only "evergreen" browsers back to the latest two versions:

  • Chrome
  • Edge (Chromium version)
  • Firefox
  • Safari

Upgrading

If you have already been using version 2.x.y and are upgrading to version 3.x.y, see our MIGRATION.md guide for details.

Contributing

Please read CONTRIBUTING.md on how to develop for degu.

License

Please read LICENSE.md

版本与发布记录

@blinkk/degu 共发布 150 个版本,首次发布于 2021/01/08;过去 12 个月发布了 0 个版本。

版本发布日期距今
3.2.1latest2024/04/092 年前
3.2.02023/05/103 年前
3.1.32023/02/023 年前
3.1.22023/01/313 年前
3.1.12023/01/283 年前
3.1.02023/01/273 年前

关于 @blinkk/degu 的常见问题

@blinkk/degu 是什么?

A general utility library for interactive websites, with a focus on performance.

如何安装 @blinkk/degu?

在项目目录运行 npm install @blinkk/degu,或使用 pnpm add / yarn add / bun add。

@blinkk/degu 支持 TypeScript 吗?

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

@blinkk/degu 支持 ESM 还是 CommonJS?

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

@blinkk/degu 需要什么版本的 Node.js?

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

@blinkk/degu 可以商用吗?

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

@blinkk/degu 的下载量有多少?

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

@blinkk/degu 还在维护吗?

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