A babel-macro to transpile `Object.assign`-style expressions to direct assignments for maximum performance.
npm install assign.macroA babel-macro to transpile Object.assign-style expressions to direct assignments for maximum performance.
This module is distributed in the npm registry under assign.macro which should be installed to your project's devDependencies:
``sh
npm install --save-dev assign.macro
Usage
After you have configured
babel-macros you can import assign.macro and utilize it like so:`js
import assign from "assign.macro";const test = {};
assign(test, {
babel: "macros",
are: "dope"
});
`...which will be transpiled to the following:
`js
const test = {};
test.babel = "macros";
test.are = "dope";
``