@putout/plugin-convert-array-copy-to-slice
🐊Putout plugin adds ability to convert array copy to slice
Last updated a month ago by coderaiser .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @putout/plugin-convert-array-copy-to-slice 
SYNC missed versions from official npm registry.

@putout/plugin-convert-array-copy-to-slice NPM version

Spread syntax (...) allows an array expression to be expanded in places where elements are expected.

The slice() method returns a shallow copy of a portion of an array into a new array.

(c) MDN

????Putout plugin convert spread to slice().

Install

npm i @putout/plugin-convert-array-copy-to-slice -D

Rule

{
    "rules": {
        "convert-array-copy-to-slice": "on"
    }
}

❌ Example of incorrect code

const places = [...items];

✅ Example of correct code

const places = items.slice();

License

MIT

Current Tags

  • 5.0.0                                ...           latest (a month ago)

12 Versions

  • 5.0.0                                ...           a month ago
  • 4.0.1                                ...           5 months ago
  • 4.0.0                                ...           5 months ago
  • 3.0.0                                ...           3 years ago
  • 2.0.0                                ...           4 years ago
  • 1.4.0                                ...           5 years ago
  • 1.3.0                                ...           5 years ago
  • 1.2.0                                ...           5 years ago
  • 1.1.0                                ...           5 years ago
  • 1.0.2                                ...           6 years ago
  • 1.0.1                                ...           6 years ago
  • 1.0.0                                ...           6 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 (7)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |