MCPcopy Create free account
hub / github.com/formkit/formkit / shouldUseLocalStorage

Function shouldUseLocalStorage

packages/addons/src/plugins/localStoragePlugin.ts:83–89  ·  view source on GitHub ↗
(controlNode: FormKitNode | undefined)

Source from the content-addressed store, hash-verified

81 let cachedLocalStorageData: string | null = ''
82
83 const shouldUseLocalStorage = (controlNode: FormKitNode | undefined) => {
84 let controlFieldValue = true
85 if (controlNode) {
86 controlFieldValue = controlNode.value === true
87 }
88 return undefine(node.props.useLocalStorage) && controlFieldValue
89 }
90
91 node.on('created', async () => {
92 await node.settled

Callers 1

localStoragePluginFunction · 0.85

Calls 1

undefineFunction · 0.90

Tested by

no test coverage detected