API: chem
Function: writeMetabolicState()
lifecycle-kit
lifecycle-kit / chem / writeMetabolicState
Function: writeMetabolicState()
writeMetabolicState(
state):string
Defined in: chem/metabolism.ts:312
Serialise a validated, canonical metabolic state for persistence.
Reads are forgiving because storage can be old or corrupt. Writes reject a
bad state instead: persisting a NaN as JSON null would make the corruption
durable and erase the argument name that caused it.
Parameters
state
Returns
string
