@putout/plugin-apply-arrow
🐊Putout plugin adds ability to convert Function Declaration to Arrow Function
Last updated 2 years ago by coderaiser .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install @putout/plugin-apply-arrow 
SYNC missed versions from official npm registry.

@putout/plugin-apply-arrow NPM version

An arrow function expression is a compact alternative to a traditional function expression, with some semantic differences and deliberate limitations in usage:

(c) MDN

🐊Putout plugin adds ability to convert Function Declaration to Arrow Function. Checkout in 🐊Putout Editor.

Install

npm i @putout/plugin-apply-arrow

Rule

{
    "rules": {
        "apply-arrow": ["on", {
            "maxSize": 30
        }]
    }
}

❌ Example of incorrect code

export function replace() {
    return {
        'if __a > __b': 'if (__a > __b)',
    };
}

✅ Example of correct code

export const replace = () => ({
    'if __a > __b': 'if (__a > __b)',
});

License

MIT

Current Tags

  • 3.0.0                                ...           latest (2 years ago)

10 Versions

  • 3.0.0                                ...           2 years ago
  • 2.0.0                                ...           2 years ago
  • 1.5.0                                ...           2 years ago
  • 1.4.0                                ...           2 years ago
  • 1.3.0                                ...           2 years ago
  • 1.2.1                                ...           2 years ago
  • 1.2.0                                ...           2 years ago
  • 1.1.0                                ...           2 years ago
  • 1.0.1                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
Maintainers (1)
Downloads
Total 6
Today 1
This Week 2
This Month 6
Last Day 0
Last Week 3
Last Month 0
Dependencies (0)
None
Dev Dependencies (8)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE