This repository has been archived by the owner on Jan 12, 2018. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Sorts the collection with the function passed as an argument. Works just like Array#find. Collection#sort will trigger a 'update' event on the collection, making views update automatically. Example: @collection = new Serenade.Collection([{name:'Jonas'}, {name:'CJ'}]) @collection.sort((a, b) -> if a.name.length < b.name.length then -1 else 1) @collection.get(0) # Returns the `{name:'CJ'}` object
- Loading branch information