Capitalize background scripts

This commit is contained in:
Shin'ya Ueoka 2019-02-24 20:54:35 +09:00
parent 21788740c1
commit a26d8a8a1b
50 changed files with 247 additions and 245 deletions

View file

@ -0,0 +1,19 @@
import MemoryStorage from '../infrastructures/MemoryStorage';
const FIND_KEYWORD_KEY = 'find-keyword';
export default class FindRepository {
constructor() {
this.cache = new MemoryStorage();
}
getKeyword() {
return Promise.resolve(this.cache.get(FIND_KEYWORD_KEY));
}
setKeyword(keyword) {
this.cache.set(FIND_KEYWORD_KEY, keyword);
return Promise.resolve();
}
}