Socket
Socket
Sign inDemoInstall

babel-features

Package Overview
Dependencies
4
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    babel-features

Test babel features, can be used to generate babel options for specific compilation targets


Version published
Maintainers
1
Install size
760 kB
Created

Readme

Source

babel-features

Test babel features, can be used to generate babel options for specific compilation targets

NOTE: The latest version (2.x) is for babel 6.x, for babel 5.x please use version 1.x

Install

npm install babel-features@latest

Usage

Node.js

var features = require('babel-features').test()
console.log(features)
// output on Node.js 5.0.0:
// { 'es3-member-expression-literals': true,
//   'es3-property-literals': true,
//   'es5-property-mutators': true,
//   'es2015-arrow-functions': true,
//   'es2015-block-scoping': true,
//   'es2015-classes': true,
//   'es2015-computed-properties': true,
//   'es2015-constants': true,
//   'es2015-destructuring': false,
//   'es2015-for-of': true,
//   'es2015-function-name': false,
//   'es2015-literals': true,
//   'es2015-object-super': true,
//   'es2015-parameters': false,
//   'es2015-shorthand-properties': true,
//   'es2015-spread': false,
//   'es2015-sticky-regex': false,
//   'es2015-template-literals': true,
//   'es2015-typeof-symbol': true,
//   'es2015-unicode-regex': false,
//   'es2015-modules': false,
//   'es2015-generators': false,
//   'es3-function-scope': true }

Use babel preset

See https://github.com/ariporad/babel-preset-features

Use babel register

var babelOptions = require('babel-features').options()
require('babel-core/register')(babelOptions)

TODO

Keywords

FAQs

Last updated on 08 Dec 2016

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc