{"name":"@putout/plugin-merge-duplicate-functions","version":"3.0.0","keywords":["putout","putout-plugin","putout-plugin-merge","plugin","merge","duplicate","functions"],"author":{"url":"https://github.com/coderaiser","name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"license":"MIT","_id":"@putout/plugin-merge-duplicate-functions@3.0.0","maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"homepage":"https://github.com/coderaiser/putout/tree/master/packages/plugin-merge-duplicate-functions#readme","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"tag":false,"dist":{"shasum":"9924768910bc833fb141c51237d07255f047fdb8","tarball":"http://registry-npm.ywwl.com/@putout/plugin-merge-duplicate-functions/download/@putout/plugin-merge-duplicate-functions-3.0.0.tgz","fileCount":4,"integrity":"sha512-ZJ8DjEKmsXZ7wUdNDyvzbPN0/aPIYxndb9egPuz5DhAvvCTb5HiIKPWqUhuwjAVhP/HQZdZAL0aSMhMzgyMWbA==","signatures":[{"sig":"MEUCIQDXQj4g/EOux5gLpl/iSrM+VPh5e1O7N3mdmXd7mCmHSQIgA3Bw9kbz8VQh0ScobiYGbAyV+6vg91oXPcFDOqJtDIQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":6419,"size":2601,"noattachment":false,"key":"/@putout/plugin-merge-duplicate-functions/-/@putout/plugin-merge-duplicate-functions-3.0.0.tgz"},"main":"lib/merge-duplicate-functions.js","type":"module","engines":{"node":">=20"},"gitHead":"2af50891c9248eea4aff13faecb874baaa4533de","release":false,"scripts":{"lint":"madrun lint","test":"madrun test","report":"madrun report","coverage":"madrun coverage","fix:lint":"madrun fix:lint","fresh:lint":"madrun fresh:lint","lint:fresh":"madrun lint:fresh","watch:test":"madrun watch:test"},"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"changelog":false,"repository":{"url":"git+https://github.com/coderaiser/putout.git","type":"git"},"_npmVersion":"11.1.0","description":"🐊Putout plugin adds ability to merge duplicate functions","directories":{},"_nodeVersion":"20.19.0","dependencies":{},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"c8":"^10.0.0","eslint":"^9.0.0","madrun":"^11.0.0","nodemon":"^3.0.1","@putout/test":"^13.0.0","eslint-plugin-n":"^17.0.0","@putout/eslint-flat":"^3.0.0","eslint-plugin-putout":"^26.0.0"},"peerDependencies":{"putout":">=39"},"_npmOperationalInternal":{"tmp":"tmp/plugin-merge-duplicate-functions_3.0.0_1743588895264_0.8768237811376718","host":"s3://npm-registry-packages-npm-production"},"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":1743588895458,"_cnpm_publish_time":1743588895458,"dist-tags":{"latest":"4.0.0"}}