Capitalize background scripts
This commit is contained in:
parent
21788740c1
commit
a26d8a8a1b
50 changed files with 247 additions and 245 deletions
19
src/background/repositories/FindRepository.js
Normal file
19
src/background/repositories/FindRepository.js
Normal 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();
|
||||
}
|
||||
}
|
||||
|
Reference in a new issue