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

metro-react-native-babel-transformer

Package Overview
Dependencies
Maintainers
2
Versions
70
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

metro-react-native-babel-transformer

Babel transformer for React Native applications.

  • 0.66.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
757K
decreased by-34.37%
Maintainers
2
Weekly downloads
 
Created

What is metro-react-native-babel-transformer?

The metro-react-native-babel-transformer package is a component of the Metro bundler specifically designed for React Native applications. It integrates Babel into the Metro bundler, allowing developers to transform JavaScript code to be compatible with various JavaScript engines. This package is crucial for compiling modern JavaScript and JSX syntax into a format that can be executed in the React Native environment.

What are metro-react-native-babel-transformer's main functionalities?

JavaScript Transformation

This feature allows the transformation of modern JavaScript and JSX code into a format suitable for execution in a React Native environment. The code sample demonstrates how to use the transformer to process a simple arrow function.

const transformer = require('metro-react-native-babel-transformer');
const sourceCode = `const x = (n) => n + 1;`;
const filename = 'example.js';
const options = {dev: true, platform: 'ios', minify: false};
const transformed = transformer.transform({filename, options, src: sourceCode});
console.log(transformed.code);

Other packages similar to metro-react-native-babel-transformer

Keywords

FAQs

Package last updated on 20 Apr 2021

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