@putout/plugin-remove-duplicate-keys
🐊Putout plugin adds ability to find and remove duplicate keys
Last updated 2 years ago by coderaiser .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @putout/plugin-remove-duplicate-keys 
SYNC missed versions from official npm registry.

@putout/plugin-remove-duplicate-keys NPM version

An object initializer is a comma-delimited list of zero or more pairs of property names and associated values of an object, enclosed in curly braces ({}).

(c) MDN

????Putout plugin adds ability to find and remove duplecate keys.

Install

npm i @putout/plugin-remove-duplicate-keys

Rule

{
    "rules": {
        "remove-duplicate-keys": "on"
    }
}

❌ Example of incorrect code

const a = {
    x: 'hello',
    ...z,
    x: 'world',
};

✅ Example of correct code

const a = {
    ...z,
    x: 'world',
};

SyntaxError: Duplicate parameter name not allowed in this context

(c) MDN

Argument name clash:

-const a = ({b, b, ...c}) => {};
+const a = ({b, ...c}) => {};

License

MIT

Current Tags

  • 9.1.1                                ...           latest (2 months ago)

16 Versions

  • 9.1.1                                ...           2 months ago
  • 9.1.0                                ...           2 months ago
  • 9.0.0                                ...           2 months ago
  • 8.1.0                                ...           5 months ago
  • 8.0.0                                ...           a year ago
  • 7.0.0                                ...           a year ago
  • 6.0.0                                ...           a year ago
  • 5.1.0                                ...           2 years ago
  • 5.0.0                                ...           2 years ago
  • 4.1.0                                ...           2 years ago
  • 4.0.0                                ...           2 years ago
  • 3.0.0                                ...           4 years ago
  • 2.1.0                                ...           5 years ago
  • 2.0.0                                ...           6 years ago
  • 1.1.0                                ...           6 years ago
  • 1.0.0                                ...           6 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 0
Dependencies (1)
Dev Dependencies (8)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |