Shift Validator
determines whether a Shift AST represents an ECMAScript program
We call an AST valid if it represents an ECMAScript program. The Shift AST format was designed to permit the fewest possible conforming ASTs that are not valid. For various reasons, it is impossible to exclude all invalid ASTs. This module distinguishes valid Shift ASTs from invalid ones.
Installation
npm install shift-validator
Usage
import isValid, {Validator} from "shift-validator";
isValid(myAst); // Boolean
Validator.validate(myAst); // [ValidationError]