safe-expr-eval
Version:
Secure expression evaluator - Drop-in replacement for expr-eval without CVE-2025-12735 vulnerability
27 lines • 656 B
TypeScript
/**
* Token types recognized by the tokenizer
*/
export type TokenType = 'NUMBER' | 'STRING' | 'BOOLEAN' | 'IDENTIFIER' | 'OPERATOR' | 'PAREN_OPEN' | 'PAREN_CLOSE' | 'FUNCTION' | 'COMMA' | 'EOF';
/**
* Token structure
*/
export interface Token {
type: TokenType;
value: string | number | boolean;
position: number;
}
/**
* Values object for variable substitution
*/
export interface Values {
[key: string]: any;
}
/**
* Comparison operators
*/
export type ComparisonOperator = '==' | '!=' | '>' | '<' | '>=' | '<=';
/**
* Logical operators
*/
export type LogicalOperator = 'and' | 'or' | 'not';
//# sourceMappingURL=types.d.ts.map