babel-plugin-preserve-arrow-function-to-string
v0.0.1
Published
A babel plugin to preserve arrow function toString. Useful to use with 'z' pattern matching package.
Downloads
2
Maintainers
Readme
#babel-plugin-preserve-arrow-function-to-string
Babel plugin to preserve arrow function toString
Install
$ npm install babel-plugin-preserve-arrow-function-to-string --save-dev
Usage
.babelrc
{
"plugins": [
"preserve-arrow-function-to-string"
]
}
Motivation
Library how use metadata reflection to analyze code not work with es5
transpiled arrow function
(and default parameters value, rest parameters, deconstruction ecc...).
This plugin replace the native toString
to match
the behavior of no transpiled arrow function.
This plugin is useful with library like
z
how use the toString
result to analyze arrow function metadata.