Ember.K is an empty function, just containing return this .
I noticed that it was used in the if statement of a filter function to save changes to EmberData. This is a filter function :
if (adapter.shouldSave(record)) { filteredSet.add(record); }
In adapters (e.g. localstorage adapter ) that do not have their own implementations of shouldSave() , the common shouldSave() only Ember.K . Does this mean that the if statement basically turns into:
if (true) { filteredSet.add(record); }
and record always added to the filteredSet .
Please correct me if I am wrong.
What are some other uses of Ember.K?
source share