
Product
Rust Support in Socket Is Now Generally Available
Socket’s Rust and Cargo support is now generally available, providing dependency analysis and supply chain visibility for Rust projects.
codegen.macro
Advanced tools
This is a babel-plugin-macros macro for
babel-plugin-codegen.
Please see those projects for more information.
This module is distributed via npm which is bundled with node and
should be installed as one of your project's devDependencies:
npm install --save-dev codegen.macro
You'll also need to install and configure
babel-plugin-macros if you haven't already.
Once you've
configured babel-plugin-macros
you can import/require codegen.macro. For example:
import codegen from 'codegen.macro'
codegen`module.exports = ['a', 'b', 'c'].map(l => 'export const ' + l + ' = ' + JSON.stringify(l)).join(';')`
↓ ↓ ↓ ↓ ↓ ↓
export const a = "a";
export const b = "b";
export const c = "c";
You'll find more usage capabilities in the babel-plugin-codegen test
snapshots.
Note:
babel-plugin-codegen allows you to have a few more
APIs than you have with this macro, but this macro comes with all the benefits
of using babel-plugin-macros (which you can read about
in the babel-plugin-macros docs).
FAQs
Generate code at build-time with babel-macros
The npm package codegen.macro receives a total of 1,970 weekly downloads. As such, codegen.macro popularity was classified as popular.
We found that codegen.macro 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.

Product
Socket’s Rust and Cargo support is now generally available, providing dependency analysis and supply chain visibility for Rust projects.

Security News
Chrome 144 introduces the Temporal API, a modern approach to date and time handling designed to fix long-standing issues with JavaScript’s Date object.

Research
Five coordinated Chrome extensions enable session hijacking and block security controls across enterprise HR and ERP platforms.