Skip to content

Instantly share code, notes, and snippets.

@ashwinkumar2438
Created January 9, 2021 06:01
Show Gist options
  • Save ashwinkumar2438/1adafd8083548aa86982c9a9209b5c15 to your computer and use it in GitHub Desktop.
Save ashwinkumar2438/1adafd8083548aa86982c9a9209b5c15 to your computer and use it in GitHub Desktop.
mystore.store("books")
.add([{book_name:"Eloquent JavaScript"},{book_name:"You don't know JS"}])
.store("users")
.add({name:"javascript"})
.then(()=> mystore.store("books").get({book_name:"Eloquent JavaScript"}) )
.then(res=>{
console.log(res.books); //The final result
})
.catch(()=>{
console.log("transaction failed");
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment