@bsull/augurs

中文文档
0.10.3发布于 2026/10/27MIT OR Apache-2.0TypeScriptES Module零依赖构建来源已验证近 30 天下载 15.2万

JavaScript bindings for the augurs time series library.

原始使用文档
文档目录3 节
  1. Installation
  2. Usage
  3. License

augurs

npm npm npm

JavaScript bindings for the augurs time series framework.

Installation

Add this package to your project with:

npm install @bsull/augurs

Usage

Full usage docs are still to come, but here's a quick example:

import initProphet, { Prophet } from '@bsull/augurs/prophet';
import initTransforms, { Pipeline, Transform } from '@bsull/augurs/transforms';
// Note: you'll need this extra package if you want to use the Prophet model.
import { optimizer } from '@bsull/augurs-prophet-wasmstan';

// Initialize the WASM components before using any augurs functions.
await Promise.all([initProphet(), initTransforms()]);

// Create a pipeline which will apply a Yeo-Johnson transform and a standard scaler.
const pipeline = new Pipeline([
  new Transform('yeoJohnson'),
  new Transform('standardScaler'),
]);

// Create a Prophet model with the WASM-based optimizer.
const prophet = new Prophet({ optimizer });

const ds = [1704067200, 1704871384, 1705675569, 1706479753, 1707283938, 1708088123,
const y = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0];

// Fit the pipeline to the data.
const yTransformed = pipeline.fitTransform(y);

// Fit the Prophet model to the transformed data.
prophet.fit({ ds, y: yTransformed });

// Make in-sample predictions and back-transform them.
const preds = prophet.predict();
const yhat = {
  point: pipeline.inverseTransform(preds.yhat.point),
  intervals: {
    lower: pipeline.inverseTransform(preds.yhat.lower),
    upper: pipeline.inverseTransform(preds.yhat.upper),
  },
};

See the documentation for more information.

License

This project is dual-licensed under the Apache 2.0 and MIT licenses.

版本与发布记录

@bsull/augurs 共发布 36 个版本,首次发布于 2023/09/29;过去 12 个月发布了 2 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.10.3latest2026/10/2712 天前
0.10.22026/02/248 个月前
0.10.12025/09/081.2 年前
0.10.02025/05/201.5 年前
0.9.02025/01/151.8 年前
0.9.0-canary.6291626e2025/01/141.8 年前

其他发布通道:no-import-meta → 0.3.2-alpha.0,canary → 0.4.0-alpha.0。

关于 @bsull/augurs 的常见问题

@bsull/augurs 是什么?

JavaScript bindings for the augurs time series library.

如何安装 @bsull/augurs?

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

@bsull/augurs 支持 TypeScript 吗?

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

@bsull/augurs 支持 ESM 还是 CommonJS?

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

@bsull/augurs 可以商用吗?

@bsull/augurs 使用 MIT OR Apache-2.0 许可。可在 MIT、Apache-2.0 中任选其一遵守。选择 MIT 时,宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@bsull/augurs 的下载量有多少?

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

@bsull/augurs 还在维护吗?

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