can-fixture
Advanced tools
Comparing version
{ | ||
"name": "can-fixture", | ||
"version": "3.0.0-pre.4", | ||
"version": "3.0.0-pre.5", | ||
"description": "Intercept AJAX requests and simulate responses.", | ||
@@ -5,0 +5,0 @@ "main": "fixture.js", |
13
store.js
@@ -126,3 +126,16 @@ var QueryLogic = require("can-query-logic"); | ||
}, | ||
createInstance: function(record){ | ||
var idProp = this.idProp; | ||
if(!(idProp in record)) { | ||
record[idProp] = ++this.maxId; | ||
} | ||
return this.connection.createData( record ); | ||
}, | ||
updateData: connectToConnection("updateData",typeConvert), | ||
updateInstance: function(record) { | ||
return this.connection.updateData(record); | ||
}, | ||
destroyInstance: function(record) { | ||
return this.connection.destroyData(record); | ||
}, | ||
destroyData: connectToConnection("destroyData",typeConvert), | ||
@@ -129,0 +142,0 @@ reset: function(newItems){ |
56787
4.2%38
8.57%1030
1.28%