babel-plugin-float-equal

0.1.2 • Public • Published

babel-plugin-float-equal

Build Status tested with jest styled with prettier All Contributors

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):


akameco

💻 📖 ⚠️ 🚇

This project follows the all-contributors specification. Contributions of any kind welcome!

License

MIT © akameco

Package Sidebar

Install

npm i babel-plugin-float-equal

Weekly Downloads

2

Version

0.1.2

License

MIT

Last publish

Collaborators

  • akameco