UNPKG

@1771technologies/lytenyte-pro

Version:

Blazingly fast headless React data grid with 100s of features.

12 lines (11 loc) 502 B
export function makeConstant(value, start, end) { if (typeof value === "number") return { type: "NumberLiteral", value, start, end }; if (typeof value === "string") return { type: "StringLiteral", value, start, end }; if (typeof value === "boolean") return { type: "BooleanLiteral", value, start, end }; if (value === null) return { type: "NullLiteral", value: null, start, end }; return { type: "UndefinedLiteral", value: undefined, start, end }; }