Version as Clean Architecture

This commit is contained in:
Shin'ya Ueoka 2018-07-22 09:30:01 +09:00
parent a1e5e97200
commit 87ed1f43a9
11 changed files with 104 additions and 114 deletions
src/background/repositories

View file

@ -0,0 +1,5 @@
export default class TabRepository {
create(url) {
browser.tabs.create({ url, });
}
}

View file

@ -0,0 +1,10 @@
export default class VersionRepository {
async get() {
let { version } = await browser.storage.local.get('version');
return version;
}
update(version) {
return browser.storage.local.set({ version });
}
}