Skip to content

Instantly share code, notes, and snippets.

@ZhangYiJiang
Created March 15, 2019 09:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ZhangYiJiang/1eaf2d3a1d3d6d39063f7325d48f36ae to your computer and use it in GitHub Desktop.
Save ZhangYiJiang/1eaf2d3a1d3d6d39063f7325d48f36ae to your computer and use it in GitHub Desktop.
For testing NUSMods data migration
code = '';
Object.keys(localStorage).forEach(k => {
if (k === 'reduxState') return;
code += `localStorage[${JSON.stringify(k)}] = ${JSON.stringify(localStorage[k])};\n`;
});
code += 'window.location.reload()'
copy(code)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment