attrString
Returns an attribute's value as a trimmed string, or null when it is absent, empty or not a string.
@internote/canvas-sdkOn this page
import { attrString } from '@internote/canvas-sdk';A binding, a refined value and a keyframe track are not strings and read as null. This is how the semantic pass reads an attribute it needs the written text of, and a validate hook reads one the same way.
#Signature
(node: NodeLike, identifier: string): string | null#Parameters
nodeThe node to read.
identifierThe attribute's canonical name.
Declared in packages/canvas-sdk/src/environment/node-attributes.ts:81.