New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

babel-preset-modern-node

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-preset-modern-node

Babel preset for modern node apps

  • 3.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
17
increased by21.43%
Maintainers
1
Weekly downloads
 
Created
Source

babel-preset-modern-node

Babel preset for building modern node apps with the least amount of transformations as possible.

build dependencies devDependencies

license npm version npm downloads

Installation

npm install --save-dev babel-preset-modern-node

Usage

Simply use this preset as any other. Following options can be passed to configure babel-preset-modern-node to your taste:

  • Set loose mode optimizations (default: false)
    • loose = true|false
  • Module loader to use (default: commonjs)
    • modules = (false|commonjs|amd|umd|systemjs)
  • Min node version compatibility (default: process.versions.node)
    • version = "5.10.2"
{
  "presets": ["modern-node"]
}

Or:

{
  "presets": [["modern-node", { "loose": true, ... }]]
}

Via CLI

babel script.js --presets modern-node

Via Node API

require('babel-core').transform('code', {
  presets: ['modern-node'],
})

Or:

require('babel-core').transform('code', {
  presets: [['modern-node', { "loose": true, ... }]],
})

Compatibility

This preset currently supports ES2015 and ES2016 support for all minor node versions starting at v0.12.

Notes on Array.includes

This preset does not modify the global space / prototypes! Due to this we're not able to fully support ES2016's Array.includes see here for more details.

Special extras

  1. If you project contains a package.json the super global __VERSION__ will be set accordingly
  2. Strict mode will be enabled
  3. Restricted keywords will always be quoted

Keywords

FAQs

Package last updated on 30 Aug 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