A JavaScript newer syntax(ES6+) detector, Only focused on **lexical** syntax, not APIs. Because new lexical syntax will cause SyntaxError, it breaks your code, and cannot caught. while the APIs may not, it can be polyfilled or caught.
npm install js-syntax-detectorA JavaScript newer syntax(ES6+) detector,
Only focused on lexical syntax, not APIs.
Because new lexical syntax will cause SyntaxError,
it breaks your code, and cannot caught.
while the APIs may not, it can be polyfilled or caught.
check it online js-syntax.
YES:
* new token(=?)
* new keywords(yield, await)
new operators(*)
* new literals(template literals)
* ...
NO:
* Promise
* globalThis
* Array.prototype.API
* Map/Set/WeakMap/WeakSet
* ...
``bash`
curl -o js-syntax https://unpkg.com/js-syntax-detector@1.0.6/bin/darwin/js-syntax
chmod +x js-syntax
./js-syntax --help
`bash`
curl -o js-syntax https://unpkg.com/js-syntax-detector@1.0.6/bin/linux/js-syntax
chmod +x js-syntax
./js-syntax --help
`bash``
npm install -g js-syntax-detector