Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
metro-react-native-babel-transformer
Advanced tools
Babel transformer for React Native applications.
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.
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);
babel-jest is a Jest plugin that facilitates the processing of JavaScript files using Babel. Similar to metro-react-native-babel-transformer, it integrates Babel for transforming code, but it is tailored for testing with Jest rather than bundling with Metro.
babel-loader is a Webpack loader that uses Babel to transform JavaScript dependencies. Like metro-react-native-babel-transformer, it allows the use of modern JavaScript features, but it is specifically designed for integration with Webpack's module bundling system.
FAQs
Babel transformer for React Native applications.
The npm package metro-react-native-babel-transformer receives a total of 1,021,450 weekly downloads. As such, metro-react-native-babel-transformer popularity was classified as popular.
We found that metro-react-native-babel-transformer demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.