
Product
Secure Your AI-Generated Code with Socket MCP
Socket MCP brings real-time security checks to AI-generated code, helping developers catch risky dependencies before they enter the codebase.
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 79 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.
Product
Socket MCP brings real-time security checks to AI-generated code, helping developers catch risky dependencies before they enter the codebase.
Security News
As vulnerability data bottlenecks grow, the federal government is formally investigating NIST’s handling of the National Vulnerability Database.
Research
Security News
Socket’s Threat Research Team has uncovered 60 npm packages using post-install scripts to silently exfiltrate hostnames, IP addresses, DNS servers, and user directories to a Discord-controlled endpoint.