MCPcopy
hub / github.com/immerjs/immer / isDraft

Function isDraft

src/utils/common.ts:29–29  ·  view source on GitHub ↗
(value: any)

Source from the content-addressed store, hash-verified

27/** Returns true if the given value is an Immer draft */
28/*#__PURE__*/
29export let isDraft = (value: any): boolean => !!value && !!value[DRAFT_STATE]
30
31/** Returns true if the given value can be drafted by Immer */
32/*#__PURE__*/

Callers 12

originalFunction · 0.85
freezeFunction · 0.85
currentFunction · 0.85
updateDraftInParentFunction · 0.85
handleCrossReferenceFunction · 0.85
handleValueFunction · 0.85
createDraftMethod · 0.85
applyPatchesMethod · 0.85
clonePatchValueIfNeededFunction · 0.85
runTestsFunction · 0.85
patch.jsFile · 0.85
runBaseTestFunction · 0.85

Calls

no outgoing calls

Tested by 2

runTestsFunction · 0.68
runBaseTestFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…