Add database.getVersion

This commit is contained in:
Daniel Gasienica 2018-03-28 13:09:09 -04:00
parent c5c94bc3ab
commit 417511ffd2

View file

@ -31,3 +31,9 @@ exports.completeTransaction = transaction =>
transaction.addEventListener('complete', () => resolve());
});
exports.getVersion = async (name) => {
const connection = await exports.open(name);
const { version } = connection;
connection.close();
return version;
};