A collection of composable computed property macros for Ember.js applications.
Ember-CPM is an Ember.js addon that provides a collection of computed property macros extending the framework's built-in capabilities. It offers reusable utilities for common data transformations, calculations, and conditional logic, making it easier to write clean and maintainable computed properties in Ember applications. The macros integrate seamlessly with Ember's reactivity system and are designed to be composable, allowing complex calculations without separate property definitions.
Ember.js developers who need to write complex computed properties involving mathematical operations, string manipulation, conditional logic, or promise integration. It's particularly useful for developers building data-intensive Ember applications where declarative and maintainable computed property patterns are essential.
Developers choose Ember-CPM over writing custom computed properties because it provides a standardized, tested set of macros for common tasks, reducing boilerplate code and potential errors. Its unique composable architecture allows macros to be nested within other macros, enabling complex calculations without intermediate property definitions—something not natively supported by Ember's built-in macros.
ComputedProperty Macros for Ember
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Macros can be nested within other macros without separate property definitions, enabling complex calculations like sum(difference('a', 'b'), product('c', 'd')) as demonstrated in the README example.
Offers a wide range of macros for math (sum, product), strings (fmt, join), conditionals (ifNull, among), and promises (computedPromise), covering common data transformation needs.
Seamlessly integrates with Ember's reactivity system, promoting clean and maintainable code patterns as stated in the project philosophy.
Version 3.0+ is only tested in the last 2 Ember LTS versions, restricting use with older or non-LTS Ember releases and requiring careful version management.
As Ember shifts towards tracked properties with Octane, this addon's reliance on computed properties may become outdated, reducing relevance for new projects.
Deeply nested composable macros can increase the reactive dependency chain, potentially impacting performance in data-intensive applications due to added complexity.