Skip to content

Instantly share code, notes, and snippets.

@k9
Last active November 2, 2018 18:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save k9/572c7d1a99da62e42aa61ce3fb6e57da to your computer and use it in GitHub Desktop.
Save k9/572c7d1a99da62e42aa61ce3fb6e57da to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>PouchDB Issue</title>
<script src="https://cdn.jsdelivr.net/npm/pouchdb@7.0.0/dist/pouchdb.min.js"></script>
</head>
<body>
</body>
</html>
db = new PouchDB('test')
console.log(db.adapter)
db.put({ '_id': '5', x: 1 }).then(() => {
console.log('promise')
db.allDocs().then(z => console.log(z))
}).catch((z) => console.log(z))
db.put({ '_id': '6', x: 2 }, () => {
console.log('callback')
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment