@putout/plugin-merge-duplicate-functions
🐊Putout plugin adds ability to merge duplicate functions
Last updated a year ago by coderaiser .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @putout/plugin-merge-duplicate-functions 
SYNC missed versions from official npm registry.

@putout/plugin-merge-duplicate-functions NPM version

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.

(c) MDN

????Putout plugin adds ability to find and merge duplicate functions. Checkout in ????Putout Editor.

Install

npm i @putout/plugin-merge-duplicate-functions

Rule

{
    "rules": {
        "merge-duplicate-functions": "on"
    }
}

āŒ Example of incorrect code

const isFn = (a) => typeof a === 'function';
const isFn1 = (a) => typeof a === 'function';
const isFn2 = (a) => typeof a === 'function';

isFn(1);
isFn1(2);

āœ… Example of correct code

const isFn = (a) => typeof a === 'function';

isFn(1);
isFn(2);

License

MIT

Current Tags

  • 4.0.0                                ...           latest (a year ago)

7 Versions

  • 4.0.0                                ...           a year ago
  • 3.0.0                                ...           a year ago
  • 2.0.0                                ...           3 years ago
  • 1.0.3                                ...           3 years ago
  • 1.0.2                                ...           3 years ago
  • 1.0.1                                ...           3 years ago
  • 1.0.0                                ...           3 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 (8)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |