Patch function.sent
npm install babel-plugin-transform-function-sentPatch function.sent meta property




The official transform-regenerator plugin already support function.sent, but
require generators to be transformed. Many people avoid use regenerator,
because all JavaScript engines already support ES2015 generators natively, and
major browsers / node 0.12+ already ship generators for years.
(See also https://github.com/alekseykulikov/babel-preset-es2015-node5/issues/3
for similar discussion and result plugin transform-es2015-generator-return)
If you are one of them, this plugin is for you. It only patch function.sent,
and will not touch other parts of your source code.
sh
npm install babel-plugin-transform-function-sent
`Usage
$3
#### .babelrc
`json
{
"plugins": ["transform-function-sent"]
}
`$3
`sh
babel --plugins transform-function-sent
`$3
`js
require("babel-core").transform("code", {
plugins: ["transform-function-sent"]
})
`$3
NOTE: Please put transform-es2015-function-name before this plugin.
Sample:
`json
{
"plugins": ["transform-es2015-function-name", "transform-function-sent"]
}
``