@putout/plugin-convert-imul-to-multiplication
🐊Putout plugin adds ability to convert 'Math.imul()' to operator '*'
Last updated 4 years ago by coderaiser .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @putout/plugin-convert-imul-to-multiplication 
SYNC missed versions from official npm registry.

@putout/plugin-convert-imul-to-multiplication NPM version

Multiplying two numbers stored internally as integers (which is only possible with AsmJS with imul is the only potential circumstance where Math.imul() may prove performant in current browsers.

(c) MDN

????Putout plugin adds ability to convert Math.imul() to * operator. Check out in ????Putout Editor.

Install

npm i @putout/plugin-convert-imul-to-multiplication -D

Rule

Rule convert-imul-to-multiplication is enabled by default, to disable add to .putout.json:

{
    "rules": {
        "convert-imul-to-multiplication": "off"
    }
}

❌ Example of incorrect code

const a = Math.imul(b, c);

✅ Example of correct code

const a = b * c;

License

MIT

Current Tags

  • 1.0.0                                ...           latest (4 years ago)

1 Versions

  • 1.0.0                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (0)
None
Dev Dependencies (6)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |