Socket
Socket
Sign inDemoInstall

accurate-calc

Package Overview
Dependencies
10
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    accurate-calc

解决javascript加、减、乘、除计算精度问题。


Version published
Weekly downloads
0
Maintainers
1
Created
Weekly downloads
 

Readme

Source

accurate-calc

介绍

解决javascript加、减、乘、除计算精度问题。 完全使用mathjs实现,懒得人就直接用吧。

安装教程
yarn add accurate-calc

npm install accurate-calc --save
使用说明
import calc from 'accurate-calc'

//加
calc('0.1+0.2')
//=>'0.3'

//减
calc('0.1-0.2')
//=>'-0.1'

//乘
calc('0.1*0.2')
//=>'0.02'

//除法
calc('0.1*0.2')
//=>'0.5'

FAQs

Last updated on 22 Nov 2020

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