Skip to content

pantoken / packages/core/src / resolveValue

函式: resolveValue()

resolveValue(raw): string

Beta(測試)

解析原始 token 值:參照會變成 var(...);具體值則原樣通過。

參數

raw

string

回傳

string

範例

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

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