js-features-used
v0.0.2
Published
Detect the JavaScript language features used in code
Downloads
3
Readme
js-features-used
Detect the JavaScript language features used in code
var featuresUsed = require('features-used')
console.log(featuresUsed(`
const foo = 'bar'
let baz = { foo }
async function main() {
const r = /hello/u
baz.foo.match(r)
}
main()
`))
/*
[ { name: 'const bindings', requiredVersion: '4.8.3' },
{ name: 'let bindings', requiredVersion: '4.8.3' },
{ name: 'literal shorthand', requiredVersion: '4.8.3' },
{ name: 'async functions', requiredVersion: '7.10.0' },
{ name: 'regex y and u flags', requiredVersion: '6.4.0' } ]
*/