Skip to content

Commit

Permalink
Updating README
Browse files Browse the repository at this point in the history
  • Loading branch information
avoidwork committed May 31, 2015
1 parent 0c018dc commit 73d70f8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 13 deletions.
21 changes: 9 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,17 @@ Harō is modern DataStore that can be wired to an API, & provides a simple feedb
var store = haro();

console.log(store.total); // 0

store.set(null, {abc: true}).then(function (arg) {
var id = arg[0];

console.log(arg); // ["ae3b34bd-8725-43e6-98a8-bf783bae6d71", {abc: true}];
console.log(arg); // [$uuid, {abc: true}];
console.log(store.total); // 1

store.set(id, {abc: false}).then(function (arg) {
console.log(arg); // ["ae3b34bd-8725-43e6-98a8-bf783bae6d71", {abc: false}];

store.del(id).then(function () {
console.log(store.total); // 0;
});
});
return store.set(arg[0], {abc: false});
}).then(function (arg) {
console.log(arg); // [$uuid, {abc: false}];
return store.del(arg[0])
}).then(function () {
console.log(store.total); // 0;
}).catch(function (e) {
console.error(e.stack || e.message || e);
});
```

Expand Down
2 changes: 1 addition & 1 deletion src/haro.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class Haro {
if ( !batch && this.uri ) {
this.request( this.uri.replace( /\?.*/, "" ) + "/" + key, {method: "delete"} ).then( next, function ( e ) {
defer.reject( e.message || e );
});
} );
} else {
next()
}
Expand Down

0 comments on commit 73d70f8

Please sign in to comment.