Ember
migration
byCodemod

Ember/5/Cp Property

/icons/calendar.svg

Last update

Jul 24, 2024

.property() is a modifier that adds additional property dependencies to an existing computed property. This codemod moves the dependencies to the main computed property definition.

Before

const Person = EmberObject.extend({
fullName: computed(function () {
return `${this.firstName} ${this.lastName}`;
}).property('firstName', 'lastName'),
});

After

const Person = EmberObject.extend({
fullName: computed('firstName', 'lastName', function () {
return `${this.firstName} ${this.lastName}`;
}),
});

Build custom codemods

Use AI-powered codemod studio and automate undifferentiated tasks for yourself, colleagues or the community

background illustrationGet Started Now