MCPcopy
hub / github.com/tldraw/tldraw / has

Method has

packages/store/src/lib/Store.ts:964–966  ·  view source on GitHub ↗

* Check whether a record with the given ID exists in the store. * * @example * ```ts * if (store.has(bookId)) { * console.log('Book exists!') * } * ``` * * @param id - The ID of the record to check * @returns True if the record exists, false otherwise * @public

(id: K)

Source from the content-addressed store, hash-verified

962 * @public
963 */
964 has<K extends IdOf<R>>(id: K): boolean {
965 return this.records.has(id)
966 }
967
968 /**
969 * Add a listener that will be called when the store changes.

Callers 15

wrapWordFunction · 0.45
execFunction · 0.45
renderBlueprintFunction · 0.45
mindmapToBlueprintFunction · 0.45
parseCssStylesFunction · 0.45
buildHierarchyFunction · 0.45
flowchartToBlueprintFunction · 0.45
visitFunction · 0.45
orderTopDownFunction · 0.45
computeActorLayoutsFunction · 0.45
sequenceToBlueprintFunction · 0.45
getStateLabelFunction · 0.45

Calls

no outgoing calls

Tested by 4

normalizeIndexesFunction · 0.36
arrowsAreSoundFunction · 0.36
generateObjectTypeFunction · 0.36
generateValidFunction · 0.36