pantoken / packages/utils/src / tokenNames
Function: tokenNames()
tokenNames(
ir):Set<string>
Beta
The set of token names an IR defines.
Parameters
ir
readonly Token[]
Returns
Set<string>
Example
ts
import { tokenNames } from "@pantoken/utils";
import type { Token } from "@pantoken/model";
const ir: Token[] = [
{ name: "--instui-leaf", syntax: "<color>", inherits: true, value: "#0374B5" },
];
tokenNames(ir); // → Set { "--instui-leaf" }