Ember/5/Cp Property Map
.property()
is a modifier that adds additional property dependencies to an existing computed property. For filter
, map
, and sort
computed property macros, this codemod ensures they receive an array of additional dependent keys as a second parameter.
Before
const Person = EmberObject.extend({friendNames: map("friends", function (friend) {return friend[this.get("nameKey")];}).property("nameKey"),});
After
const Person = EmberObject.extend({friendNames: map("friends", ["nameKey"], function (friend) {return friend[this.get("nameKey")];}),});
Build custom codemods
Use AI-powered codemod studio and automate undifferentiated tasks for yourself, colleagues or the community