Skip to content

keelii/js-syntax

Repository files navigation

JavaScript syntax detector

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.

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
  • ...

screenshots

Image

CLI tool

Darwin

curl -o js-syntax https://unpkg.com/js-syntax-detector@1.0.11/bin/darwin/js-syntax
chmod +x js-syntax
./js-syntax --help

Linux(x86_64)

curl -o js-syntax https://unpkg.com/js-syntax-detector@1.0.11/bin/linux/js-syntax
chmod +x js-syntax
./js-syntax --help

Use it in your project

npm install -g js-syntax-detector

About

JavaScript newer syntax(ES6+) detection and code formatting tool.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors