Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
@eps1lon/babel-plugin-optimize-react
Advanced tools
Babel plugin for optimizing common React patterns
Fork of babel-plugin-optimize-react
which includes:
React.use*
hook callsThis Babel 7 plugin optimizes React hooks by transforming common patterns into more effecient output when using with tools such as Create React App. For example, with this plugin the following output is optimized as shown:
// Original
var _useState = Object(react__WEBPACK_IMPORTED_MODULE_1_["useState"])(Math.random()),
_State2 = Object(_Users_gaearon_p_create_rreact_app_node_modules_babel_runtime_helpers_esm_sliceToArray_WEBPACK_IMPORTED_MODULE_0__["default"])(_useState, 1),
value = _useState2[0];
// With this plugin
var useState = react__WEBPACK_IMPORTED_MODULE_1_.useState;
var __ref__0 = useState(Math.random());
var value = __ref__0[0];
// Original
import React, {memo, useState} from 'react';
// With this plugin
import React from 'react';
const {memo, useState} = React;
// Original
const [counter, setCounter] = useState(0);
// With this plugin
const __ref__0 = useState(0);
const counter = __ref__0[0];
const setCounter = __ref__0[1];
// Original
import React from 'react';
function MyComponent() {
return React.createElement('div', null, 'Hello world');
}
// With this plugin
import React from 'react';
const __reactCreateElement__ = React.createElement;
function MyComponent() {
return __reactCreateElement__('div', null, 'Hello world');
}
FAQs
Babel plugin for optimizing common React patterns
The npm package @eps1lon/babel-plugin-optimize-react receives a total of 0 weekly downloads. As such, @eps1lon/babel-plugin-optimize-react popularity was classified as not popular.
We found that @eps1lon/babel-plugin-optimize-react demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.