Add todoapp benchmark

This commit is contained in:
Roman Vishnevskii 2017-04-24 16:00:32 +07:00
commit 02e7b40c07
218 changed files with 63168 additions and 0 deletions

View file

@ -0,0 +1,19 @@
import Ember from 'ember';
export default Ember.Service.extend({
lastId: 0,
data: null,
findAll() {
return this.get('data') || this.set('data', []);
},
add(attrs) {
let todo = Object.assign({ id: this.incrementProperty('lastId') }, attrs);
this.get('data').pushObject(todo);
return todo;
},
delete(todo) {
this.get('data').removeObject(todo);
}
});