UNPKG

translate-maker

Version:

Lightweight translation module. Internationalize your great project.

35 lines (28 loc) 492 B
import Cache from './Cache'; export default class Memory extends Cache { constructor(options = {}) { super(options); this.data = {}; } get(key) { return this.data[key]; } has(key) { return !!this.data[key]; } set(key, value) { this.data[key] = value; return true; } clear() { this.data = {}; return true; } dehydrate() { return this.data; } rehydrate(state) { this.data = state; } } //# sourceMappingURL=Memory.js.map