
Security News
ECMAScript 2025 Finalized with Iterator Helpers, Set Methods, RegExp.escape, and More
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
check-ecmascript-version-compatibility
Advanced tools
Test files for ECMAScript version compatibility.
A small lib that helps check and make sure that your JavaScript will run in chosen ES version environment (defaults to ES5).
npm install --save-dev check-ecmascript-version-compatibility
Here's an example that uses Mocha:
var checkFile = require("check-ecmascript-version-compatibility");
describe("my file", function () {
it("is ES2016-compliant", function (done) {
// It can take awhile to parse large files, so you may need to
// increase your timeouts.
this.slow(8000);
this.timeout(10000);
checkFile("path/to/file.js", 2016, done);
});
});
If you do not pass in a version number, it will default to ES5.
describe("my file", function () {
it("is ES5-compliant", function (done) {
// It can take awhile to parse large files, so you may need to
// increase your timeouts.
this.slow(8000);
this.timeout(10000);
checkFile("path/to/file.js", done);
});
});
FAQs
Test files for ECMAScript version compatibility.
The npm package check-ecmascript-version-compatibility receives a total of 85 weekly downloads. As such, check-ecmascript-version-compatibility popularity was classified as not popular.
We found that check-ecmascript-version-compatibility demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.
Research
North Korean threat actors linked to the Contagious Interview campaign return with 35 new malicious npm packages using a stealthy multi-stage malware loader.