📄️ create()
Use create() for draft mutation to get a new state, which also supports currying.
📄️ apply()
Use apply() for applying patches to get the new state.
📄️ makeCreator()
makeCreator() only takes options as the first argument, resulting in a custom create() function.
📄️ current()
Get the current value from a draft.
📄️ original()
Get the original value from a draft.
📄️ rawReturn()
For return values that do not contain any drafts, you can use rawReturn() to wrap this return value to improve performance. It ensure that the return value is only returned explicitly.
📄️ unsafe()
When strict mode is enabled, mutable data can only be accessed using unsafe().
📄️ isDraftable()
Check if a value is draftable
📄️ isDraft()
Check if a value is a draft.
📄️ markSimpleObject()
markSimpleObject() is a mark function that marks all objects as immutable.