{"name":"@putout/plugin-merge-duplicate-functions","version":"4.0.0","type":"module","author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"description":"🐊Putout plugin adds ability to merge duplicate functions","homepage":"https://github.com/coderaiser/putout/tree/master/packages/plugin-merge-duplicate-functions#readme","main":"lib/merge-duplicate-functions.js","release":false,"tag":false,"changelog":false,"repository":{"type":"git","url":"git+https://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","putout-plugin-merge","plugin","merge","duplicate","functions"],"devDependencies":{"@putout/eslint-flat":"^3.0.0","@putout/test":"^13.0.0","c8":"^10.0.0","eslint":"^9.0.0","eslint-plugin-n":"^17.0.0","eslint-plugin-putout":"^26.0.0","madrun":"^11.0.0","nodemon":"^3.0.1"},"peerDependencies":{"putout":">=40"},"license":"MIT","engines":{"node":">=20"},"publishConfig":{"access":"public"},"_id":"@putout/plugin-merge-duplicate-functions@4.0.0","gitHead":"6e7496d7aa213b02511cc9a29da171e5003df81d","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_nodeVersion":"22.15.0","_npmVersion":"11.1.0","dist":{"integrity":"sha512-LoefL2G/l+B8ticJUxOVVOQy3eVVLL//oc/A26rEmJv1uZlS7jblpdNjqs6L+X03PE7mQMLw1CEc2pOlzgVh/g==","shasum":"3fc5bc473279c32ff9da9b6b02f337b7f71c27ee","tarball":"http://registry-npm.ywwl.com/@putout/plugin-merge-duplicate-functions/download/@putout/plugin-merge-duplicate-functions-4.0.0.tgz","fileCount":4,"unpackedSize":6832,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIEIB9nh7k5VrbEr9c4UkNXhPRcryRtDX10iSKOrgkA8GAiEAgGEI1a9WoQ5uVh6SCo1oegQ+qesFI9kNCU9h/k8OrdU="}],"size":2659,"noattachment":false,"key":"/@putout/plugin-merge-duplicate-functions/-/@putout/plugin-merge-duplicate-functions-4.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-npm-production","tmp":"tmp/plugin-merge-duplicate-functions_4.0.0_1747245008719_0.6334670164923213"},"_hasShrinkwrap":false,"readme":"# @putout/plugin-merge-duplicate-functions [![NPM version][NPMIMGURL]][NPMURL]\n\n[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-merge-duplicate-functions.svg?style=flat&longCache=true\n[NPMURL]: https://npmjs.org/package/@putout/plugin-merge-duplicate-functions \"npm\"\n\n> Functions are one of the fundamental building blocks in JavaScript. A function in JavaScript is similar to a procedure—a set of statements that performs a task or calculates a value, but for a procedure to qualify as a function, it should take some input and return an output where there is some obvious relationship between the input and the output. To use a function, you must define it somewhere in the scope from which you wish to call it.\n>\n> (c) [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Functions)\n\n🐊[**Putout**](https://github.com/coderaiser/putout) plugin adds ability to find and merge duplicate functions. Checkout in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/2cb7e8836ce0adb6009f21859f8a0c15/9eea5b36a4f6664b05f2f9f0abd271a62a4dbbbe).\n\n## Install\n\n```\nnpm i @putout/plugin-merge-duplicate-functions\n```\n\n## Rule\n\n```json\n{\n    \"rules\": {\n        \"merge-duplicate-functions\": \"on\"\n    }\n}\n```\n\n## ❌ Example of incorrect code\n\n```js\nconst isFn = (a) => typeof a === 'function';\nconst isFn1 = (a) => typeof a === 'function';\nconst isFn2 = (a) => typeof a === 'function';\n\nisFn(1);\nisFn1(2);\n```\n\n## ✅ Example of correct code\n\n```js\nconst isFn = (a) => typeof a === 'function';\n\nisFn(1);\nisFn(2);\n```\n\n## License\n\nMIT\n","publish_time":1747245008910,"_cnpm_publish_time":1747245008910,"dist-tags":{"latest":"4.0.0"}}