npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@einfach/excel-core-ts

v0.1.0

Published

TypeScript port of the Rust einfach-excel-core. Formula parser + evaluator + workbook state; reactive layer delegated to @einfach/core.

Readme

@einfach/excel-core-ts

TypeScript 公式引擎:分词器 + 解析器 + 求值器 + Workbook 数据模型。响应式那一层委托给 @einfach/core(走 npm,见 ADR 0002),本包只拥有公式逻辑与工作簿模型。

private 包,不发布。

它在栈里的位置

本包是 einfach-excel-core(Rust)的 TS 孪生实现,有两个现役用途:

  1. parity 参照 —— 同一批 e2e 与单测跑两个引擎,用来钉住行为一致性 (矩阵见 excel/solid-excel/e2e/BACKEND_PARITY.md)。
  2. 第二个 worker 后端 —— excel/solid-excel/src-vnext/adapter/worker-runtime-ts.ts 持有本包的 Workbook,实现与 Rust 版同一套 worker 协议。这条路径不需要 WASM,纯 JS 可部署。

Rust 引擎仍是现役主引擎(excel-site 默认走它)。本包不是它的替代计划 —— 早期文档里 「用 TS 版取代 Rust 版」的叙事已经作废,那批规划稿在 docs/archive/

结构

src/parser/        分词器 + 解析器(公式文本 → AST)
src/eval/          求值器
src/eval/functions/  内置函数注册表,按类别分文件(math / stats / text / date /
                     lookup / logical / financial / engineering / info /
                     database / array)
src/refs/          A1 地址与区间解析
src/workbook.ts    Workbook:多表、命名区间、变更入口
src/sheet.ts       单表状态与解析器接线
src/deps.ts        依赖图
src/propagation.ts 失效传播
src/types.ts       跨轨道公共契约(AST、Value、函数签名、变更形状)

内置函数的清单以各 src/eval/functions/*.tsFUNCTIONS 导出为准,barrel 自动合并; 跨文件重名由测试拦截:

npx jest excel/excel-core-ts/test/functions-registry.test.ts --no-coverage

包边界

本包只能导入 @einfach/core。不得导入:

  • solid-js、React,或任何 DOM 类型
  • worker 全局、postMessagenavigatorwindow
  • wasm-pack 产出的绑定
  • 任何其他 @einfach/* 包(不含 spreadsheet-ui-coresolidreact-*

必须能在纯 node 下跑干净。需要 worker / DOM 的适配器住在下游 excel/solid-excel/src-vnext/adapter/

开发

npm run build -w @einfach/excel-core-ts                 # tsc
npx jest excel/excel-core-ts --no-coverage              # 本包全部单测
npx tsc --noEmit -p excel/excel-core-ts/tsconfig.json   # 只类型检查

文档