{"_id":"@putout/plugin-convert-math-pow","_rev":"4153869","name":"@putout/plugin-convert-math-pow","description":"🐊Putout plugin adds ability to convert Math.pow to exponentiation operator","dist-tags":{"latest":"5.0.1"},"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"time":{"modified":"2026-03-01T20:18:57.000Z","created":"2019-02-26T11:12:04.279Z","5.0.1":"2022-05-22T10:48:49.342Z","5.0.0":"2022-05-21T20:12:30.881Z","4.0.0":"2019-11-03T19:46:16.106Z","3.0.0":"2019-09-11T11:37:34.656Z","2.0.0":"2019-09-08T10:06:49.377Z","1.2.0":"2019-06-19T11:42:33.941Z","1.1.0":"2019-06-14T10:05:13.454Z","1.0.0":"2019-02-26T11:12:04.279Z"},"users":{},"author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"repository":{"type":"git","url":"git://github.com/coderaiser/putout.git"},"versions":{"5.0.1":{"name":"@putout/plugin-convert-math-pow","version":"5.0.1","type":"commonjs","author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"description":"🐊Putout plugin adds ability to convert Math.pow to exponentiation operator","homepage":"https://github.com/coderaiser/putout/tree/master/packages/plugin-convert-math-pow#readme","main":"lib/convert-math-pow.js","release":false,"tag":false,"changelog":false,"repository":{"type":"git","url":"git://github.com/coderaiser/putout.git"},"scripts":{"test":"madrun test","watch:test":"madrun watch:test","lint":"madrun lint","fresh:lint":"madrun fresh:lint","lint:fresh":"madrun lint:fresh","fix:lint":"madrun fix:lint","coverage":"madrun coverage","report":"madrun report"},"dependencies":{},"keywords":["putout","putout-plugin","plugin","remove","only"],"devDependencies":{"@putout/test":"^5.0.0","c8":"^7.5.0","eslint":"^8.0.1","eslint-plugin-node":"^11.0.0","eslint-plugin-putout":"^15.0.0","madrun":"^9.0.0"},"peerDependencies":{"putout":">=26"},"license":"MIT","engines":{"node":">=16"},"publishConfig":{"access":"public"},"gitHead":"583e15ddc2583f8b07f16d71ef18629a8efcc7b2","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_id":"@putout/plugin-convert-math-pow@5.0.1","_nodeVersion":"16.15.0","_npmVersion":"8.3.0","dist":{"shasum":"259b90a9ef6635ff59c5fec1c517f67dc137bc59","size":2086,"noattachment":false,"key":"/@putout/plugin-convert-math-pow/-/@putout/plugin-convert-math-pow-5.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/@putout/plugin-convert-math-pow/download/@putout/plugin-convert-math-pow-5.0.1.tgz"},"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"directories":{},"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-convert-math-pow_5.0.1_1653216529120_0.9517885152154013"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-05-22T10:48:55.793Z","publish_time":1653216529342,"_cnpm_publish_time":1653216529342},"5.0.0":{"name":"@putout/plugin-convert-math-pow","version":"5.0.0","type":"commonjs","author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"description":"🐊Putout plugin adds ability to convert Math.pow to exponentiation operator","homepage":"https://github.com/coderaiser/putout/tree/master/packages/plugin-convert-math-pow#readme","main":"lib/convert-math-pow.js","release":false,"tag":false,"changelog":false,"repository":{"type":"git","url":"git://github.com/coderaiser/putout.git"},"scripts":{"test":"madrun test","watch:test":"madrun watch:test","lint":"madrun lint","fresh:lint":"madrun fresh:lint","lint:fresh":"madrun lint:fresh","fix:lint":"madrun fix:lint","coverage":"madrun coverage","report":"madrun report"},"dependencies":{},"keywords":["putout","putout-plugin","plugin","remove","only"],"devDependencies":{"@putout/test":"^5.0.0","c8":"^7.5.0","eslint":"^8.0.1","eslint-plugin-node":"^11.0.0","eslint-plugin-putout":"^15.0.0","madrun":"^9.0.0"},"peerDependencies":{"putout":">=26"},"license":"MIT","engines":{"node":">=16"},"publishConfig":{"access":"public"},"gitHead":"8ccc5bad81f251222e8f9e250c20afa511a0baa2","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_id":"@putout/plugin-convert-math-pow@5.0.0","_nodeVersion":"16.15.0","_npmVersion":"8.3.0","dist":{"shasum":"20f0d11f7eca1f15fae396ad5fcc738dbbae5924","size":1991,"noattachment":false,"key":"/@putout/plugin-convert-math-pow/-/@putout/plugin-convert-math-pow-5.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@putout/plugin-convert-math-pow/download/@putout/plugin-convert-math-pow-5.0.0.tgz"},"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"directories":{},"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-convert-math-pow_5.0.0_1653163950700_0.3493383118399127"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-05-21T20:12:35.267Z","publish_time":1653163950881,"_cnpm_publish_time":1653163950881},"4.0.0":{"name":"@putout/plugin-convert-math-pow","version":"4.0.0","author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"description":"putout plugin adds ability to convert Math.pow to exponentiation operator","homepage":"http://github.com/coderaiser/putout","main":"lib/convert-math-pow.js","release":false,"tag":false,"changelog":false,"repository":{"type":"git","url":"git://github.com/coderaiser/putout.git"},"scripts":{"test":"madrun test","lint":"madrun lint","fix:lint":"madrun fix:lint","coverage":"madrun coverage"},"dependencies":{},"keywords":["putout","putout-plugin","plugin","remove","only"],"devDependencies":{"@putout/test":"^1.3.0","coveralls":"^3.0.0","eslint":"^6.2.0","eslint-plugin-node":"^10.0.0","eslint-plugin-putout":"^2.0.0","madrun":"^4.1.0","nyc":"^14.0.0","supertape":"^1.0.3"},"peerDependencies":{"putout":">=6.20"},"license":"MIT","engines":{"node":">=8.3.0"},"publishConfig":{"access":"public"},"bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_id":"@putout/plugin-convert-math-pow@4.0.0","_nodeVersion":"13.0.1","_npmVersion":"6.12.0","dist":{"shasum":"bb22a8ea97df32977852e462ac1d81aba32e7022","size":1861,"noattachment":false,"key":"/@putout/plugin-convert-math-pow/-/@putout/plugin-convert-math-pow-4.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@putout/plugin-convert-math-pow/download/@putout/plugin-convert-math-pow-4.0.0.tgz"},"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-convert-math-pow_4.0.0_1572810375981_0.8194616462859401"},"_hasShrinkwrap":false,"publish_time":1572810376106,"_cnpm_publish_time":1572810376106,"_cnpmcore_publish_time":"2021-12-16T21:05:36.139Z"},"3.0.0":{"name":"@putout/plugin-convert-math-pow","version":"3.0.0","author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"description":"putout plugin adds ability to convert Math.pow to exponentiation operator","homepage":"http://github.com/coderaiser/putout","main":"lib/convert-math-pow.js","release":false,"tag":false,"changelog":false,"repository":{"type":"git","url":"git://github.com/coderaiser/putout.git"},"scripts":{"test":"madrun test","lint":"madrun lint","fix:lint":"madrun fix:lint","coverage":"madrun coverage"},"dependencies":{},"keywords":["putout","putout-plugin","plugin","remove","only"],"devDependencies":{"@putout/test":"^1.3.0","coveralls":"^3.0.0","eslint":"^6.2.0","eslint-plugin-node":"^10.0.0","eslint-plugin-putout":"^2.0.0","madrun":"^3.0.0","nyc":"^14.0.0","supertape":"^1.0.3"},"peerDependencies":{"putout":">=5.24"},"license":"MIT","engines":{"node":">=8.3.0"},"publishConfig":{"access":"public"},"bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_id":"@putout/plugin-convert-math-pow@3.0.0","_nodeVersion":"12.10.0","_npmVersion":"6.10.0","dist":{"shasum":"9719e7c33720a106e61c1f09827974a63fa1c7e5","size":1954,"noattachment":false,"key":"/@putout/plugin-convert-math-pow/-/@putout/plugin-convert-math-pow-3.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@putout/plugin-convert-math-pow/download/@putout/plugin-convert-math-pow-3.0.0.tgz"},"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-convert-math-pow_3.0.0_1568201854543_0.12792698312615025"},"_hasShrinkwrap":false,"publish_time":1568201854656,"_cnpm_publish_time":1568201854656,"_cnpmcore_publish_time":"2021-12-16T21:05:36.488Z"},"2.0.0":{"name":"@putout/plugin-convert-math-pow","version":"2.0.0","author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"description":"putout plugin adds ability to convert Math.pow to exponentiation operator","homepage":"http://github.com/coderaiser/putout","main":"lib/convert-math-pow.js","release":false,"tag":false,"changelog":false,"repository":{"type":"git","url":"git://github.com/coderaiser/putout.git"},"scripts":{"test":"madrun test","lint":"madrun lint","fix:lint":"madrun fix:lint","coverage":"madrun coverage"},"dependencies":{},"keywords":["putout","putout-plugin","plugin","remove","only"],"devDependencies":{"@putout/test":"^1.3.0","coveralls":"^3.0.0","eslint":"^6.2.0","eslint-plugin-node":"^10.0.0","eslint-plugin-putout":"^2.0.0","madrun":"^3.0.0","nyc":"^14.0.0","supertape":"^1.0.3"},"peerDependencies":{"putout":">=5.12"},"license":"MIT","engines":{"node":">=8.3.0"},"publishConfig":{"access":"public"},"bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_id":"@putout/plugin-convert-math-pow@2.0.0","_nodeVersion":"12.10.0","_npmVersion":"6.10.0","dist":{"shasum":"7378c65c7cdcb05b3e57118ae30ea3c7e280bb9c","size":1999,"noattachment":false,"key":"/@putout/plugin-convert-math-pow/-/@putout/plugin-convert-math-pow-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@putout/plugin-convert-math-pow/download/@putout/plugin-convert-math-pow-2.0.0.tgz"},"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-convert-math-pow_2.0.0_1567937209223_0.6318460145772875"},"_hasShrinkwrap":false,"publish_time":1567937209377,"_cnpm_publish_time":1567937209377,"_cnpmcore_publish_time":"2021-12-16T21:05:36.731Z"},"1.2.0":{"name":"@putout/plugin-convert-math-pow","version":"1.2.0","author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"description":"putout plugin adds ability to convert Math.pow to exponentiation operator","homepage":"http://github.com/coderaiser/putout","main":"lib/convert-math-pow.js","release":false,"tag":false,"changelog":false,"repository":{"type":"git","url":"git://github.com/coderaiser/putout.git"},"scripts":{"test":"madrun test","lint":"madrun lint","fix:lint":"madrun fix:lint","coverage":"madrun coverage"},"dependencies":{},"keywords":["putout","putout-plugin","plugin","remove","only"],"devDependencies":{"@putout/eslint-config":"^1.0.2","@putout/test":"^1.3.0","coveralls":"^3.0.0","eslint":"^5.6.0","eslint-plugin-node":"^8.0.1","eslint-plugin-putout":"^1.3.1","madrun":"^2.0.0","nyc":"^14.0.0","putout":"^4.3.2","supertape":"^1.0.3"},"peerDependencies":{"putout":">=4.31"},"license":"MIT","engines":{"node":">=8.3.0"},"publishConfig":{"access":"public"},"bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_id":"@putout/plugin-convert-math-pow@1.2.0","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"shasum":"9dc612c4e96eee0038cf30b03447c66b978957e9","size":2123,"noattachment":false,"key":"/@putout/plugin-convert-math-pow/-/@putout/plugin-convert-math-pow-1.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@putout/plugin-convert-math-pow/download/@putout/plugin-convert-math-pow-1.2.0.tgz"},"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-convert-math-pow_1.2.0_1560944553827_0.4815160910752945"},"_hasShrinkwrap":false,"publish_time":1560944553941,"_cnpm_publish_time":1560944553941,"_cnpmcore_publish_time":"2021-12-16T21:05:36.956Z"},"1.1.0":{"name":"@putout/plugin-convert-math-pow","version":"1.1.0","author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"description":"putout plugin adds ability to convert Math.pow to exponentiation operator","homepage":"http://github.com/coderaiser/putout","main":"lib/convert-math-pow.js","release":false,"tag":false,"changelog":false,"repository":{"type":"git","url":"git://github.com/coderaiser/putout.git"},"scripts":{"test":"madrun test","lint":"madrun lint","fix:lint":"madrun fix:lint","coverage":"madrun coverage"},"dependencies":{},"keywords":["putout","putout-plugin","plugin","remove","only"],"devDependencies":{"@putout/eslint-config":"^1.0.2","@putout/test":"^1.3.0","coveralls":"^3.0.0","eslint":"^5.6.0","eslint-plugin-node":"^8.0.1","eslint-plugin-putout":"^1.3.1","madrun":"^2.0.0","nyc":"^14.0.0","putout":"^4.3.2","supertape":"^1.0.3"},"peerDependencies":{"putout":">=4.3.2"},"license":"MIT","engines":{"node":">=8.3.0"},"publishConfig":{"access":"public"},"bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_id":"@putout/plugin-convert-math-pow@1.1.0","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"shasum":"f2e8c03f6e84e6250f48ccd8a486dbb123886489","size":2129,"noattachment":false,"key":"/@putout/plugin-convert-math-pow/-/@putout/plugin-convert-math-pow-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@putout/plugin-convert-math-pow/download/@putout/plugin-convert-math-pow-1.1.0.tgz"},"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-convert-math-pow_1.1.0_1560506713281_0.6497121166605817"},"_hasShrinkwrap":false,"publish_time":1560506713454,"_cnpm_publish_time":1560506713454,"_cnpmcore_publish_time":"2021-12-16T21:05:37.128Z"},"1.0.0":{"name":"@putout/plugin-convert-math-pow","version":"1.0.0","author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"description":"putout plugin adds ability to convert Math.pow to exponentiation operator","homepage":"http://github.com/coderaiser/putout","main":"lib/convert-math-pow.js","release":false,"tag":false,"changelog":false,"repository":{"type":"git","url":"git://github.com/coderaiser/putout.git"},"scripts":{"test":"madrun test","lint":"madrun lint","fix:lint":"madrun fix:lint","coverage":"madrun coverage"},"dependencies":{},"keywords":["putout","putout-plugin","plugin","remove","only"],"devDependencies":{"@putout/eslint-config":"^1.0.2","@putout/test":"^1.3.0","coveralls":"^3.0.0","eslint":"^5.6.0","eslint-plugin-node":"^8.0.1","eslint-plugin-putout":"^1.3.1","madrun":"^2.0.0","nyc":"^13.0.1","putout":"^4.3.2","supertape":"^1.0.3"},"peerDependencies":{"putout":">=4.3.2"},"license":"MIT","engines":{"node":">=8.3.0"},"publishConfig":{"access":"public"},"bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_id":"@putout/plugin-convert-math-pow@1.0.0","_nodeVersion":"11.10.0","_npmVersion":"6.8.0","dist":{"shasum":"045e31e5c63a289077f66d21c79ae21a6cc34f34","size":2126,"noattachment":false,"key":"/@putout/plugin-convert-math-pow/-/@putout/plugin-convert-math-pow-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@putout/plugin-convert-math-pow/download/@putout/plugin-convert-math-pow-1.0.0.tgz"},"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-convert-math-pow_1.0.0_1551179524136_0.629189961366986"},"_hasShrinkwrap":false,"publish_time":1551179524279,"_cnpm_publish_time":1551179524279,"_cnpmcore_publish_time":"2021-12-16T21:05:37.619Z"}},"readme":"# @putout/plugin-convert-math-pow [![NPM version][NPMIMGURL]][NPMURL]\n\n[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-convert-math-pow.svg?style=flat&longCache=true\n[NPMURL]: https://npmjs.org/package/@putout/plugin-convert-math-pow \"npm\"\n\n> - The [`Math.pow()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/pow) static method, given two arguments, base and exponent, returns baseexponent.\n> - The [**exponentiation operator**](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Exponentiation) (`**`) 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.\n>\n> (c) MDN\n\n????[**Putout**](https://github.com/coderaiser/putout) plugin adds ability to convert `Math.pow` to **exponentiation operator**.\n\n## Install\n\n```\nnpm i @putout/plugin-convert-math-pow -D\n```\n\n## Rule\n\nRule `convert-math-pow` is enabled by default, to disable add to `.putout.json`:\n\n```json\n{\n    \"rules\": {\n        \"convert-math-pow\": \"off\"\n    }\n}\n```\n\n## ❌ Example of incorrect code\n\n```js\nMath.pow(2, 4);\n```\n\n## ✅ Example of correct code\n\n```js\n2 ** 4;\n```\n\n## Comparison\n\nLinter | Rule | Fix\n--------|-------|------------|\n???? **Putout** | [`convert-math-pow`](https://github.com/coderaiser/putout/tree/master/packages/plugin-convert-math-pow#readme) | ✅\n???? **ESLint** | [`prefer-exponentiation-operator`](https://eslint.org/docs/rules/prefer-exponentiation-operator) | ✅\n\n## License\n\nMIT\n","_attachments":{},"homepage":"https://github.com/coderaiser/putout/tree/master/packages/plugin-convert-math-pow#readme","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"license":"MIT"}