Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

babelee

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babelee

Babel preset generator based on user-agent string.

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

babelee

Babel preset generator based on user-agent string. You can only transform the parts which are not supported by the specific browser to ES5 code.

  • Feature detection is reference to ECMAScript 6 compatibility table
  • No polyfills included. Use Polyfills as a Service or/and Babel polyfill if needed.

Install

npm install --save babelee

Usage

var babel = require('babel-core')
var babelee = require('babelee')

var result = babel.transform('let max = (...n) => Math.max(...n);', {
  presets: [
    babelee('Mozilla/5.0 (Mac OS X 10.11; rv:38.0) Gecko/20100101 Firefox/38.0')
  ]
})
console.log(result.code)
/*
var max = function max() {        // arrow function is transformed
  return Math.max(...arguments);  // spread operator is not transformed
};
*/

License

MIT

Keywords

FAQs

Package last updated on 04 Apr 2016

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc