Newlyweds Proposing Marriage
Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

js-features-used

0.0.2 • Public • Published

js-features-used

styled with prettier

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' } ]
*/

Keywords

none

Install

npm i js-features-used

DownloadsWeekly Downloads

2

Version

0.0.2

License

MIT

Last publish

Collaborators

  • avatar