Enter or paste code and it will instantly detect whether it contains ES6 syntax. You can also import js files for detection. Detect whether there is ES6 (ES2015) new syntax in the js code. It can also detect new syntax such as ES7, ES8, ES9, and ES10. Ensure that the built js does not have ES6+, and ensure that all js codes are converted to ES5 syntax to completely prevent the new syntax from causing old browsers to report errors!
Import file detection ES6
Enter js code to detect ES6
Congratulations, ES6 not found
ES6 was discovered. After the code goes online, users using old browsers may not work properly. The following error message contains the line number of ES6. It is recommended to convert ES6 to ES5
Features
Enter js code, or paste the code, to detect whether the code contains new js syntax such as ES6, ES7, etc.
Import js files and detect whether the files contain ES6+ new syntax. It also supports dragging files to this webpage to import files for detection
Identify ES6 new syntax and detect whether code with ES6+ features has been written, such as: Check if I wrote ES6 code
The new syntaxes that support detection are: ES6(2015), ES7(2016), ES8(2017), ES9(2018), ES10(2019), ES11(2020), ES12(2021), ES13(2022), ES14(2023), or "latest"
After Vue.js/React/Webpack/Vite/Babel is built, check whether there are any ES6+ new syntax and detect them online without installing a complex programming environment
How to find the location of ES6 code? Check the position of ES6 in the code. After this program detects the ES6 syntax, it will display the code line number and column position information of ES6
The js deployed to the production environment should not have ES6+ new syntax, so as to ensure compatibility with old browsers and webviews, such as Android large-screen hardware, old mobile phones, industrial Android environments, embedded js runtimes, etc.
Program principle: The js code is lexically analyzed to form an AST abstract syntax tree, and the code is detected to see whether it contains keywords and features of ES6+ syntax. If you want to write a program to detect ES6, you can refer to the implementation principle of this program
Identify and report whether your code uses new features of ECMAScript 6 (ES6 for short) and later.
Comprehensive compatibility check: Through precise analysis of JavaScript syntax structure, whether it is simple let and const declarations, or complex classes, arrow functions, destructuring assignments, template strings, module import and export and other advanced features, all It can accurately capture every syntax usage of ES6 and its subsequent versions.
Convenient and easy to use: Just import or paste your JS code to quickly get a detailed ES6 syntax usage report, helping you ensure code compatibility and portability under multiple browser environments and older JavaScript engines. .
Hazards of bringing ES6 and ES7+ online to the production environment: The program cannot work when encountering the user's old browser. The user encounters errors, white screens, and web content fails to load. ES6 is detected and converted to ES5. Problems That’s it
Differences from es-checker: This program It is to detect whether the code contains ES6. His program is to detect how many ES6 features the browser supports
If you need to convert ES6 to ES5 online, you can use ES6 to ES5