@putout/plugin-apply-arrow
🐊Putout plugin adds ability to convert Function Declaration to Arrow Function
Last updated a year ago by coderaiser .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm 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 (a year ago)

10 Versions

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

Copyright 2013 - present © cnpmjs.org | Home |