filters - allows to define filters that can be used to apply common text formatting Example (pretty version, default is minimized) VUEComponent.filters("capitalize", "if (!value) return '';value = value.toString();return value.charAt(0).toUpperCase() + value.slice(1);") filters: { * capitalize: function (value) { * if (!value) return ''; * value = value.toString(); * return value.charAt(0).toUpperCase() + value.slice(1); * } }
t { // assert(VUEComponent.filters("capitalize", "if (!value) return '';value = value.toString();return value.charAt(0).toUpperCase() + value.slice(1);").filters("capitalize").length > 0)