You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Prevent any special symbols or operators in names.
Opt 1: Filtering ~``!@#$%^&*()-_=+{}|[]\;:'<>?,./ - exclusionary approach can allow strange edge cases and must account for the endless strangeness of Unicode special symbols.
Opt 2: Must match ^[a-zA-Z0-9\.\-_]+$ - restricted can limit use cases, but much safer.
Exclude all builtin JS functions & internal operation names.
parseInt, parseFloat, (there's an NPM package with arrays of this...)
Get a dynamic list of prefixOps and infixOps. (need to export from the expression-language/index.)
No lone or dotted numbers (avoids some array/index collisions & weirdness.)
❌ 42 = 'Antwerd'
❌ 42.24 = 'Antwerd'
✅ words[42] = 'Antwerd'
Throw error on dangerous Object.prototype.... methods.
valueOf, toString, toJSON, etc.
The text was updated successfully, but these errors were encountered:
For all variable/token names:
~``!@#$%^&*()-_=+{}|[]\;:'<>?,./
- exclusionary approach can allow strange edge cases and must account for the endless strangeness of Unicode special symbols.^[a-zA-Z0-9\.\-_]+$
- restricted can limit use cases, but much safer.parseInt
,parseFloat
, (there's an NPM package with arrays of this...)prefixOps
andinfixOps
. (need to export from theexpression-language/index
.)42 = 'Antwerd'
42.24 = 'Antwerd'
words[42] = 'Antwerd'
Object.prototype....
methods.valueOf
,toString
,toJSON
, etc.The text was updated successfully, but these errors were encountered: