Skip to content

pantoken / packages/utils/src / tokenNames

Functie: tokenNames()

tokenNames(ir): Set<string>

Bèta

De verzameling tokennamen die een IR definieert.

Parameters

ir

alleen-lezen Token[]

Retourneert

Set<string>

Voorbeeld

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" }