traph.macro
JS Babel macro for Object transformation graph
A babel-macros
version of
traph
,
a functional utility to transform Objects easily,
leveraging object getters and graphs.
The performance of the macro should be greatly improved over the performance of the function.
Install
$ npm install traph.macro
Usage
Assuming babel-macros
is installed and configured,
the traph
macro has the same usage of the
traph
function.
Input:
const stats = const transformed =
Output:
const stats = { return Object} const transformed =
API
The API is identical to the traph
function,
with the exception of the lazy
mode. The mode is always lazy now.
License
MIT © caesarsol