Skip to content

pantoken-root / packages/core/src / isContextual

Swyddogaeth: isContextual() ​

isContextual(value): boolean

Bêta

Yn wir pan na ellir i werth fod yn werth cychwynnol @property wedi'i deipio (var() / light-dark()).

Paramedrau ​

value ​

string

Yn dychwelyd ​

boolean

Enghraifft ​

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

isContextual("var(--x)");            // → true
isContextual("light-dark(#fff, #000)"); // → true
isContextual("#fff");                // → false