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

@repay/babel-preset

Package Overview
Dependencies
Maintainers
0
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@repay/babel-preset

Babel preset for front end applications

  • 1.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
31
increased by287.5%
Maintainers
0
Weekly downloads
 
Created
Source

@repay/babel-preset

Babel preset used by @repaygithub

Usage

Install via the command line using yarn or npm

@babel/core, @babel/runtime, and core-js are peer dependencies, which means you must install them yourself.

yarn add --dev @repay/babel-preset @babel/core @babel/runtime core-js
# OR
npm install --save-dev @repay/babel-preset @babel/core @babel/runtime core-js

Add the preset to your .babelrc or equivalent

{
  "presets": ["@repay/babel-preset"]
}

EcmaScript Features Supported

  • All Proposals that have reached stage-4 and are implemented by @babel/preset-env

  • Class Properties (does not include private fields)

    class Accordian extends Component {
      state = { isOpen: this.props.openOnMount || false };
    
      // using assignment like below,
      // `this` references the class instance always
      toggleOpen = () =>
        this.setState(s => {
          isOpen: !s.isOpen;
        });
    }
    
  • Object rest spread (e.g. let obj = {...props})

Polyfills

There are two options you can pass to control polyfills:

  • coreJsPolyfill (default: false): When this option is true, the useBuiltIns: 'usage' option will be passed into @babel/preset-env to automatically add in only the necessary CoreJS polyfills needed.
  • regeneratorPolyfill (default: false): When this option is true, the regenerator: true option will be passed into the @babel/plugin-transform-runtime plugin.

FAQs

Package last updated on 20 Sep 2024

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