nodeById

Returns the mark with an #id, cue wrappers unwrapped, optionally only among the kinds the match names, or undefined.

@internote/canvas-sdkFunction
On this page
import { nodeById } from '@internote/canvas-sdk';

Ids canonicalise to lower case in the compiler, so the id asked for is folded to meet them: a reference read raw finds its node the same as one read through referencedNodeId.

#Signature

<N extends NodeLike>(
    children: readonly N[],
    id: string,
    match?: NodeMatch<N>,
): N | undefined

#Parameters

children
An environment's children.
id
The id to find, with or without its #.
match
Which kinds of node may answer. Absent means any.

Declared in packages/canvas-sdk/src/environment/node-query.ts:146.

Last updated