@putout/plugin-convert-concat-to-flat
🐊Putout plugin adds ability to convert concat to flat
Last updated 2 months ago by coderaiser .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @putout/plugin-convert-concat-to-flat 
SYNC missed versions from official npm registry.

@putout/plugin-convert-concat-to-flat NPM version

The flat() method creates a new array with all sub-array elements concatenated into it recursively up to the specified depth.

(c) MDN

????Putout plugin adds ability to convert concat to flat.

Install

npm i @putout/plugin-convert-concat-to-flat -D

Rule

{
    "rules": {
        "convert-concat-to-flat": "on"
    }
}

❌ Example of incorrect code

[].concat(...array);

✅ Example of correct code

array.flat();

License

MIT

Current Tags

  • 2.0.0                                ...           latest (2 months ago)

2 Versions

  • 2.0.0                                ...           2 months ago
  • 1.0.0                                ...           5 years 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 (7)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |