babel-plugin-float-equal
v0.1.2
Published
babel pluign for float equal
Downloads
8
Maintainers
Readme
babel-plugin-float-equal
Babel plugin for float equal
Install
$ npm install --save-dev babel-plugin-float-equal
Usage
.babelrc
{
plugins: ["float-equal"]
}
Example
0.1 + 0.2 === 0.3
↓ ↓ ↓ ↓ ↓ ↓
typeof (0.1 + 0.2) === 'number' && typeof 0.3 === 'number'
? Math.abs(0.1 + 0.2 - 0.3) < Number.EPSILON
: 0.1 + 0.2 === 0.3
Contributors
Thanks goes to these wonderful people (emoji key):
This project follows the all-contributors specification. Contributions of any kind welcome!
License
MIT © akameco