@breejs/later

中文文档
4.2.0发布于 2023/11/29MITCommonJS零依赖近 30 天下载 206.4万

Maintained fork of later. Determine later (or previous) occurrences of recurring schedules

原始使用文档
文档目录9 节
  1. Table of Contents
  2. Features
  3. Documentation
  4. Install
  5. Usage
  6. Node
  7. Browser
  8. Contributors
  9. License

@breejs/later

build status code coverage code style styled with prettier made with lass license npm downloads

This project is a maintained fork of Later, as I needed it to be maintained and modernized for Bree. Later is a library for describing recurring schedules and calculating their future occurrences. It supports a very flexible schedule definition including support for composite schedules and schedule exceptions. Create new schedules manually, via Cron expression, via text expressions, or using a fully chainable API.

Table of Contents

Features

Types of schedules supported by Later:

  • Run a report on the last day of every month at 12 AM except in December
  • Install patches on the 2nd Tuesday of every month at 4 AM
  • Gather CPU metrics every 10 mins Mon - Fri and every 30 mins Sat - Sun
  • Send out a scary e-mail at 13:13:13 every Friday the 13th

Documentation

See https://breejs.github.io/later/ for complete documentation and usage.

Install

npm:

npm install @breejs/later

Usage

Node

const later = require('@breejs/later');

console.log(later);

Browser

VanillaJS

This is the solution for you if you're just using <script> tags everywhere!

<script src="https://unpkg.com/@breejs/later"></script>
<script type="text/javascript">
  (function() {
    console.log(later);
  })();
</script>

Bundler

Assuming you are using browserify, webpack, rollup, or another bundler, you can simply follow Node usage above.

Contributors

NameWebsite
BunKat
Nick Baughhttp://niftylettuce.com/
yrambler2001https://yrambler2001.me/

License

MIT © BunKat

版本与发布记录

@breejs/later 共发布 11 个版本,首次发布于 2020/08/17;过去 12 个月发布了 0 个版本。

版本发布日期距今
4.2.0latest2023/11/292 年前
4.1.02021/10/275 年前
4.0.22020/08/216 年前
4.0.12020/08/216 年前
4.0.02020/08/216 年前
3.0.32020/08/186 年前

关于 @breejs/later 的常见问题

@breejs/later 是什么?

Maintained fork of later. Determine later (or previous) occurrences of recurring schedules

如何安装 @breejs/later?

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

@breejs/later 支持 TypeScript 吗?

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

@breejs/later 支持 ESM 还是 CommonJS?

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

@breejs/later 需要什么版本的 Node.js?

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

@breejs/later 可以商用吗?

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

@breejs/later 的下载量有多少?

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

@breejs/later 还在维护吗?

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