Skip to content

parseStateDefinitions

parseStateDefinitions(json): StateDefinition[]

Defined in: packages/simply-settings-core/src/address/stateDefinitions.ts:45

Validates and normalizes state definitions given as a JSON object mapping {Country}-{State} ISO 3166-2 codes to state names — e.g. { "US-CA": "California" }, the same shape the mattandneil/statecodes Visualforce page edits.

unknown

The already-parsed JSON value.

StateDefinition[]

One definition per key, in the object’s key order.

SfError (InvalidStateDefinitionsError) naming the first invalid entry.