Created
April 17, 2017 10:04
-
-
Save pionize/270a1ef534cf5accce69e19c9e1efa41 to your computer and use it in GitHub Desktop.
Promise Pattern
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
db.allDocs(...).then(function (resultOfAllDocs) { | |
return localdb.put(...); | |
}).then(function (resultOfPut) { | |
return localdb.get(...); | |
}).then(function (resultOfGet) { | |
return localdb.put(...); | |
}).catch(function (err) { | |
console.log(err); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment