Detect ESnext features in your code.
MIT License
Prevent from shipping unexpected ES6 code to your users, and more...
const
let
template literal
tagged template literal
class
arrow function
async/await
es module
dynamic import
destructuring
generator
for..of
Object.assign
Map
Set
WeakMap
WeakSet
Promise
Proxy
yarn global add detect-es
detect-es foo.js
const { parse } = require('detect-es')
const stats = parse('const foo = {...bar}')
console.log(stats.has('const'))
// true
console.log(stats.has('object_rest_spread'))
// true
git checkout -b my-new-feature
git commit -am 'Add some feature'
git push origin my-new-feature
detect-es © EGOIST, Released under the MIT License. Authored and maintained by EGOIST with help from contributors (list).
egoist.moe · GitHub @EGOIST · Twitter @_egoistlily