@deckdeckgo/utils

中文文档
5.1.0发布于 2022/02/01MITTypeScriptESM + CJS零依赖近 30 天下载 4284

A collection of utils methods and functions developed for DeckDeckGo

此软件包已被标记为弃用

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

原始使用文档
文档目录8 节
  1. Table of contents
  2. Methods
  3. Unify an event
  4. Debounce
  5. Is mobile?
  6. Is iOS?
  7. Is full screen?
  8. License

npm license

DeckDeckGo - Utils

A collection of utils methods and functions developed and used across apps and components of DeckDeckGo.

Table of contents

Methods

The following functions and methods are statically exposed:

Unify an event

To unify a mouse or touche event

static unifyEvent(e: any): any

Debounce

Debounce a function. Per default 300ms.

static debounce(func: Function, timeout?: number)

Is mobile?

Is the current navigator used on mobile devices? The list of devices from Detect Mobile Browsers is use for detection purpose.

static isMobile(): boolean

Is iOS?

Is the current device an iOS one (iPad, iPhone and iPod)?

static isIOS(): boolean

Is full screen?

Compare the window.innerHeight and screen.height to detect full screen or not.

static isFullscreen(): boolean

License

MIT © David Dal Busco and Nicolas Mattia

版本与发布记录

@deckdeckgo/utils 共发布 30 个版本,首次发布于 2019/05/30;过去 12 个月发布了 0 个版本。

版本发布日期距今
5.1.0latest2022/02/014 年前
5.0.02022/02/014 年前
4.0.02022/01/084 年前
3.1.02021/12/164 年前
3.0.02021/12/104 年前
2.4.02021/11/065 年前

关于 @deckdeckgo/utils 的常见问题

@deckdeckgo/utils 是什么?

A collection of utils methods and functions developed for DeckDeckGo注意:该包已被作者标记为弃用——Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

如何安装 @deckdeckgo/utils?

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

@deckdeckgo/utils 支持 TypeScript 吗?

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

@deckdeckgo/utils 支持 ESM 还是 CommonJS?

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

@deckdeckgo/utils 可以商用吗?

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

@deckdeckgo/utils 的下载量有多少?

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

@deckdeckgo/utils 还在维护吗?

最新版本 5.1.0 发布于 2022/02/01(4 年前);至今共发布 30 个版本,其中过去 12 个月发布了 0 个;首次发布于 2019/05/30。作者已将其标记为弃用,新项目建议寻找替代方案。