Skip to content

Use ES6 features #6330

@rachel-fenichel

Description

@rachel-fenichel

Is your feature request related to a problem? Please describe.

After removing support for Internet Explorer (#6325) and updating the generated target to ES2015 (#6328) we can also remove ES5-specific code in favor of ES6 constructs without inducing bloat from overly aggressive polyfills.

This is a place to track which features we want to use, rationale for changes, and rationale for any old language features we continue to exclusively use.

Describe the solution you'd like

Update old code to use new features across the codebase, where those features are known to improve performance, size, or readability.

Describe alternatives you've considered

Stick with existing code, and use new features as we write new code.

Feature list

  • Use Maps instead of Object.create(null)
  • array.includes is in ES2016 Convert array.indexOf(a) !== -1 to array.includes(a)
  • Delete object.inherits and object.mixin
  • Needs investigation Use default parameters
  • Use Sets

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions