
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
babel-plugin-auto-symbol-description
Advanced tools
A Babel plugin to automatically set Symbol descriptions.
A Babel plugin to automatically set Symbol descriptions.
Note: Babel 7 is supported in version 2.0+.
Note: Babel 6 is supported in version 1.0+. Keep using version 0.0.1 for Babel 5 support.
Very useful with Redux if you use Symbols for action types:
In:
// TodoActions.js
export const CREATE = Symbol();
export const CREATE_SUCCESS = Symbol();
export const CREATE_FAILURE = Symbol();
Out (something like this):
// TodoActions.js
export const CREATE = Symbol('TodoActions.CREATE');
export const CREATE_SUCCESS = Symbol('TodoActions.CREATE_SUCCESS');
export const CREATE_FAILURE = Symbol('TodoActions.CREATE_FAILURE');
Then use these constants in a reducer:
// TodoReducer.js
import * as TodoActions from '../actions/TodoActions';
export function TodoReducer(state, action) {
switch (action) {
case TodoActions.CREATE:
// Handle create
break;
case TodoActions.CREATE_SUCCESS:
// Handle create success
break;
case TodoActions.CREATE_FAILURE:
// Handle create failure
break;
default:
return state;
}
}
Symbol descriptions are only useful for debugging, so idealy you would only include this transformation in development.
npm install -D babel-plugin-auto-symbol-description
.babelrc:
{
"env": {
"development": {
"plugins": ["auto-symbol-description"]
}
}
}
This plugin won't transform any Symbol
calls with an argument, and it only
works for assignments and variable declarations for now. Let me know if there is
demand for the transformation when setting an object property or any other use
cases.
FAQs
A Babel plugin to automatically set Symbol descriptions.
The npm package babel-plugin-auto-symbol-description receives a total of 0 weekly downloads. As such, babel-plugin-auto-symbol-description popularity was classified as not popular.
We found that babel-plugin-auto-symbol-description 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
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.