JavaScript Validation Using Esprima