Socket
Socket
Sign inDemoInstall

babel-preset-aws-lambda

Package Overview
Dependencies
215
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    babel-preset-aws-lambda

AWS Lambda Preset


Version published
Weekly downloads
4
increased by300%
Maintainers
1
Install size
54.1 MB
Created
Weekly downloads
 

Readme

Source

babel-preset-aws-lambda

Babel preset for AWS λ functions

This preset currently transforms code to be compatible with node versions of amazon AWS lambda funcions.

  • Defaults transpiling code to node version 6.10.
  • regenerator-runtime is too heavyweight so it is excluded.
  • Object rest/spread transform.
  • Async/await.
  • Exponentiation Operator.

Install

$ npm install --save-dev babel-preset-aws-lambda

Usage

.babelrc

{
  "presets": ["aws-lambda"]
}

Via CLI

$ babel script.js --presets aws-lambda

Via Node API

require("babel-core").transform("code", {
  presets: ["aws-lambda"]
});

Targeting Environments

This module uses babel-preset-env to target specific environments.

Please refer to babel-preset-env#targets for a list of available options.

You may override our default list of targets by providing your own targets key.

{
  "presets": [["aws-lambda", {
    "targets": {
      "node": 4
    }
  }]]
}

To enable debug mode, set the debug key to true.

{
  "presets": [["aws-lambda", {
    "debug": true
  }]]
}

Keywords

FAQs

Last updated on 20 Nov 2017

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