import { createLocalStorage } from './cache'

const STORAGE_CODE = 'question_type'
const DURATION = 24 * 60 * 60

export const lsQuestion = createLocalStorage()

/* 获取Question */
export function getQuestion() {
  return lsQuestion.get(STORAGE_CODE)
}

/* 设置Question */
export function setQuestion(value) {
  lsQuestion.set(STORAGE_CODE, value, DURATION)
}

/* 移出Question */
export function removeQuestion() {
  lsQuestion.remove(STORAGE_CODE)
}
