Socket
Socket
Sign inDemoInstall

@bnqkl/calc

Package Overview
Dependencies
0
Maintainers
2
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @bnqkl/calc

an css like calc parser and compiler and executor


Version published
Weekly downloads
18
increased by125%
Maintainers
2
Created
Weekly downloads
 

Readme

Source

计算表达式

感谢 https://github.com/peakchen90/decimal-eval/ 为表达式解析器打下基础。本项目从该解析器开始起航。

移除了 bignumber.js,而是引入了“分数”作为计算的概念,因为分数可以用两个 bigint 来表达,那么就可以用于无限的精度。

TODO

  • 函数表达式的支持
  • 支持自定义对象作为 “数值”,而不再仅仅是 string,从而达到更高的性能
  • 更好的 API 设计,使得 Parser 是完全独立隔离的
  • 自定义单位支持
  • 使用 WASM 产出更高的性能

FAQs

Last updated on 16 May 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc