This repository has been archived by the owner on Mar 20, 2022. It is now read-only.
v3.0.0
The entire normalizr package has been rewritten from v2.x for this version. Please refer to the documentation for all changes.
Added
schema.Entity
processStrategy
for modifyingEntity
objects before they're moved to theentities
stack.mergeStrategy
for merging with multiple entities with the same ID.
- Added
schema.Object
, with a shorthand of{}
- Added
schema.Array
, with a shorthand of[ schema ]
Changed
Schema
has been moved to aschema
namespace, available atschema.Entity
arrayOf
has been replaced byschema.Array
or[]
unionOf
has been replaced byschema.Union
valuesOf
has been replaced byschema.Values
Removed
normalize
no longer accepts an optionaloptions
argument. All options are assigned at the schema level.- Entity schema no longer accepts
defaults
as an option. Use a customprocessStrategy
option to apply defaults as needed. assignEntity
has been replaced byprocessStrategy
meta
option. SeeprocessStrategy