@alessiofrittoli/math-utils

中文文档
3.0.1发布于 2026/10/29MITTypeScriptESM + CJS零依赖近 30 天下载 3021

Lightweight TypeScript math utility functions

原始使用文档
文档目录6 节
  1. Lightweight TypeScript math utility functions
  2. Table of Content
  3. Getting started
  4. What's Changed
  5. Development
  6. Made with ☕

Math Utils 🤓

Lightweight TypeScript math utility functions

This lightweight TypeScript utility library comes with common and utility math functions.

Latest version Test coverage Socket Security score npm downloads Dependencies Dependencies status

minified minizipped Tree shakable

Fund this package

Table of Content


Getting started

Run the following command to start using math-utils in your projects:

npm i @alessiofrittoli/math-utils

or using pnpm

pnpm i @alessiofrittoli/math-utils

What's Changed

Updates in the latest release 🎉

  • Welcome Tween!
  • Removed deprecated easeOutCirc in favor of Easings.easeOutCirc() function. See Easing API Reference for more info.

Development

Run the following to start development

nvm use

pnpm i

Local development

Run the following

pnpm dev

This will generate unminified output code, sourcemaps and will enable source file watcher.


Production build

Run the following to create a local production build

pnpm build

This will generate minified output code without sourcemaps.


Unit tests

Run all the defined test suites by running the following:

# Run tests and watch file changes.
pnpm test:watch

# Run tests in a CI environment.
pnpm test:ci

Run tests with coverage

An HTTP server is then started to serve coverage files from ./coverage folder.

⚠️ You may see a blank page the first time you run this command. Simply refresh the browser to see the updates.

pnpm test:coverage:serve

Contributing

Contributions are truly welcome!

Please refer to the Contributing Doc for more information on how to start contributing to this project.

Help keep this project up to date with GitHub Sponsor.

GitHub Sponsor


Security

If you believe you have found a security vulnerability, we encourage you to responsibly disclose this and NOT open a public issue. We will investigate all legitimate reports. Email [email protected] to disclose any security vulnerabilities.


Made with ☕

avatar
Alessio Frittoli
https://alessiofrittoli.it | [email protected]

版本与发布记录

@alessiofrittoli/math-utils 共发布 32 个版本,首次发布于 2024/11/24;过去 12 个月发布了 11 个版本。

版本发布日期距今
3.0.1latest2026/10/2910 天前
3.0.02026/10/2910 天前
2.2.02026/10/2613 天前
2.1.02026/10/1524 天前
2.0.02026/02/258 个月前
2.0.0-alpha.2alpha2026/02/178 个月前

关于 @alessiofrittoli/math-utils 的常见问题

@alessiofrittoli/math-utils 是什么?

Lightweight TypeScript math utility functions

如何安装 @alessiofrittoli/math-utils?

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

@alessiofrittoli/math-utils 支持 TypeScript 吗?

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

@alessiofrittoli/math-utils 支持 ESM 还是 CommonJS?

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

@alessiofrittoli/math-utils 需要什么版本的 Node.js?

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

@alessiofrittoli/math-utils 可以商用吗?

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

@alessiofrittoli/math-utils 的下载量有多少?

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

@alessiofrittoli/math-utils 还在维护吗?

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