🐊Putout plugin adds ability to convert 'Math.pow()' to 'exponentiation operator'
npm install @putout/plugin-convert-math-pow[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-convert-math-pow.svg?style=flat&longCache=true
[NPMURL]: https://npmjs.org/package/@putout/plugin-convert-math-pow "npm"
> - The Math.pow() static method, given two arguments, base and exponent, returns baseexponent.
> - The exponentiation operator (**) returns the result of raising the first operand to the power of the second operand. It is equivalent to Math.pow, except it also accepts BigInts as operands.
>
> (c) MDN
🐊Putout plugin adds ability to convert Math.pow to exponentiation operator. Merged to @putout/plugin-math.
```
npm i @putout/plugin-convert-math-pow -D
`json`
{
"rules": {
"convert-math-pow": "on"
}
}
`js`
Math.pow(2, 4);
`js`
2 ** 4;
Linter | Rule | Fix
--------|-------|------------|
🐊 Putout | convert-math-pow | ✅
⏣ ESLint | prefer-exponentiation-operator` | ✅
MIT