Skip to content

pantoken-root / packages/core/src / resolveValue

Swyddogaeth: resolveValue() ​

resolveValue(raw): string

Bêta

Datrys gwerth token crai: mae cyfeiriad yn troi'n var(...); mae gwerth concrid yn pasio drwyddo.

Paramedrau ​

raw ​

string

Yn dychwelyd ​

string

Enghraifft ​

ts
import { resolveValue } from "@pantoken/core";

resolveValue("{semantic.color.background.base}"); // → "var(--instui-color-background-base)"
resolveValue("#ffffff");                          // → "#ffffff"