export function readLs(key) {
  try {
    return localStorage.getItem(key);
  } catch (_) {
    return null;
  }
}


export function writeLs(key, value) {
  try {
    if (value == null) localStorage.removeItem(key);
    else localStorage.setItem(key, value);
  } catch (_) {
    /* ignore */
  }
}
