Skip to content

Instantly share code, notes, and snippets.

@tlvince
Created January 6, 2015 18:47
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 tlvince/924b4b59aea604160f35 to your computer and use it in GitHub Desktop.
Save tlvince/924b4b59aea604160f35 to your computer and use it in GitHub Desktop.
PouchDB 3.2.0 changes
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<script src="https://cdn.jsdelivr.net/pouchdb/3.2.0/pouchdb.js"></script>
<script>
var db = new PouchDB('test-promises');
db.compact()
.then(function(response) {
console.log(response);
})
.catch(function(error) {
throw error;
});
var cb = new PouchDB('test-cb');
cb.compact(function(err, res) {
if (err) throw err;
console.log(res);
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment