This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse/components/computed.js

18 lines
411 B
JavaScript

Discourse.computed = {
/**
Returns whether two properties are equal to each other.
@method propertyEqual
@params {String} p1 the first property
@params {String} p2 the second property
@return {Function} computedProperty function
**/
propertyEqual: function(p1, p2) {
return Ember.computed(function() {
return this.get(p1) === this.get(p2);
}).property(p1, p2);
}
};