Skip to content
Shapemetry

@huukhanhnguyen/model / core/ref

core/ref

encodeBase64()

encodeBase64(text): string

Parameters

text

string

Returns

string


encodeInlineRef()

encodeInlineRef(doc): string

Encode a sub-model JSON doc as an inline data: reference (base64 JSON). Used by bundleModel when inlining a ref directly into the node (the alternative to the sibling models snapshot map).

Parameters

doc

unknown

Returns

string


parseRef()

parseRef(ref): ParsedRef

Classify a model reference string into one of the three schemes. Pure + sync. apps/web/src/evaluate.ts (the host resolver) calls this directly rather than re-testing the scheme/decoding the ref itself.

Parameters

ref

string

Returns

ParsedRef

Last updated: 📖 1 min readEdit on GitHub