-
-
Save EvanHahn/6ed9bc4a5e56934cfd5fce52a768a744 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require("node:fs"); | |
const parseEcmascriptVersion = require("ecmascript-version-detector").parse; | |
const browserJs = fs.readFileSync("./browser.js", "utf8"); | |
const parsed = parseEcmascriptVersion(browserJs); | |
for (const expression of parsed) { | |
const expressionVersion = parseInt(expression.version, 10); | |
if (expressionVersion > 5) { | |
console.log(expression); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment