Function: schemaFromDump()
schemaFromDump(
dump,gameVersion?):SaveSchema
Defined in: artifacts.ts:140
Derives a schema from an IndexedDB record copied out of a browser.
Accepts any of:
- a whole
savestable copy (an array of records) - one record, such as the
__SYSTEM_INITIAL_STATE__row - a bare state object, in which case
gameVersionis required
Parameters
dump
unknown
Parsed JSON from the browser
gameVersion?
string
Required only for a bare state object or a mixed dump
Returns
The derived schema
Throws
Error if the dump holds no recognisable state