isAuthored

Returns whether an attribute's value is one an author wrote rather than the declared default the compiler filled in.

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

The compiler fills every declared default in before a renderer sees a node, so the two cannot be told apart by presence. A plain value equal to the default — compared as written, case and spacing aside — counts as the default: an author who writes the default explicitly is read as having left it unset. A list, a lookup or any other refined shape is always authored.

#Signature

(nodeIdentifier: string, attrIdentifier: string, value: unknown): boolean

#Parameters

nodeIdentifier
The node's identifier.
attrIdentifier
The attribute's canonical name.
value
The attribute's value, as refined.

Declared in packages/canvas-sdk/src/environment/registry.ts:498.

Last updated