@flourish/font-watcher

中文文档
0.0.2发布于 2021/01/12UNLICENSEDESM + CJS零依赖近 30 天下载 3773

Calls update() when new fonts are loaded

原始使用文档

Flourish font watcher

The function exported from this module will call window.template.update() (or another function) when any new fonts are loaded.

How to install

npm install -s @flourish/font-watcher

Then import it with:

import addFontWatcher from "@flourish/font-watcher";

Usage

If no callback is specified, then addFontWatcher will call window.template.update() whenever it detects that a new font has been loaded:

addFontWatcher();

If you supply a callback, then it will be called with a FontFaceSetLoadEvent object as the parameter. For example, you can do:

addFontWatcher(function () {
    console.log("Fonts have loaded");
});

版本与发布记录

@flourish/font-watcher 共发布 2 个版本,首次发布于 2020/04/03;过去 12 个月发布了 0 个版本。

版本发布日期距今
0.0.2latest2021/01/125 年前
0.0.12020/04/036 年前

关于 @flourish/font-watcher 的常见问题

@flourish/font-watcher 是什么?

Calls update() when new fonts are loaded

如何安装 @flourish/font-watcher?

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

@flourish/font-watcher 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/flourish__font-watcher 是否存在。

@flourish/font-watcher 支持 ESM 还是 CommonJS?

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

@flourish/font-watcher 可以商用吗?

@flourish/font-watcher 使用 UNLICENSED 许可。作者声明为 UNLICENSED,即不授予公开使用许可(与公共领域的 Unlicense 不同)。使用前需获得作者授权。以上为概括,不构成法律意见,请以许可原文为准。

@flourish/font-watcher 的下载量有多少?

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

@flourish/font-watcher 还在维护吗?

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