Add todoapp benchmark
This commit is contained in:
parent
479db8c2cc
commit
02e7b40c07
218 changed files with 63168 additions and 0 deletions
19
bench/implementations/ember-2.6.3/app/services/repo.js
Executable file
19
bench/implementations/ember-2.6.3/app/services/repo.js
Executable 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);
|
||||
}
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue