Skip to content

Instantly share code, notes, and snippets.

@mochki
Created April 14, 2022 22:03
Show Gist options
  • Save mochki/2b5f579ffbf52e4f8a6e567c597743e4 to your computer and use it in GitHub Desktop.
Save mochki/2b5f579ffbf52e4f8a6e567c597743e4 to your computer and use it in GitHub Desktop.
vamp survr save migration (when steam wont sync and its in "Capaciitor Storage")
copy(
Object.entries({...window.localStorage})
.reduce((acc, [key, val]) => ({...acc, [key.replace('CapacitorStorage.', '')]: JSON.parse(val)}), {})
)
Object.entries(a).forEach(([k, v]) => {window.localStorage.setItem(`CapacitorStorage.${k}`, JSON.stringify(v))})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment