punyexpr

JSON →
library 1.3.1 ·javascript
verified May 1, 2026

A minimalist (5144 bytes), zero-dependency expression compiler and evaluator for JavaScript. Current stable version is 1.3.1, released on an ongoing basis with fixes and features. It compiles expression strings into reusable functions that evaluate against a context object, supporting arithmetic, string operations, member access, function calls, and ternary expressions. It does NOT support bitwise, async, coalesce, new, this, or object literals. Regular expressions are disabled by default for security (ReDoS) and can be enabled via an option. The library includes TypeScript type definitions and is compliant with Content Security Policy (CSP). It is a safer alternative to eval() or new Function() for dynamic expressions.

total hits 8
actors 3 distinct systems
last hit 4d ago AhrefsBot
GPTBot
2
ClaudeBot
1
Humans
2

top countries 🇺🇸 United States · 🇨🇦 Canada · 🇫🇷 France · FJ