Ember.js V5 - New Array Wrapper

This automation removes any usage of new with A, and calls A as a standard function.

Ember.js
jscodeshift
Estimated time saving
5 minutes/occurrence
Change mode
Autonomous
Applicability criteria

Ember.js version higher or equal to 3.6.

Made by
Rajasegar Chandran
Rajasegar Chandran

Usage →

Codemod CLI:

intalling vs code extension tooltip icon
codemod ember/5/array-wrapper
copy CLI command icon

Codemod VS Code extension:

intalling vs code extension tooltip icon
vs code logo
Run in VS Code

Use/edit codemod in Codemod Studio:

intuita logo without text
Open in Codemod Studio

Description

This codemod removes any usage of new with A, and calls A as a standard function.

Example

Before:

import { A } from '@ember/array'; let arr = new A(); 

After:

import { A as emberA } from '@ember/array'; let arr = A(); 

Links for more info