New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

babel-plugin-accuracy

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-accuracy

fault tolerance

latest
Source
npmnpm
Version
0.0.4
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

babel-plugin-accuracy

用于项目容错

Contents

  • 解决浮点数的计算精度问题
  • 全等号问题 当项目中===的不相等,但是双等相等时,会抛出警告,避免隐藏的类型变化造成的问题
  • async函数中增加try catch
  • promise 最后一个then后面增加catch

Installation and Usage

npm install babel-plugin-accuracy --save-dev

添加babel-plugin-accuracy

.babelrc
["babel-plugin-accuracy",options]

option

  • checkCong:检查全等号
  • addAsyncTry:async函数中增加try catch
  • promiseCatch: promise 最后一个then后面增加catch

example

{
	"plugins": [
        ["babel-plugin-accuracy",{checkCong:true}]
    ]
}

Keywords

float

FAQs

Package last updated on 27 Dec 2019

Did you know?

Socket

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