@babel/plugin-proposal-pipeline-operator
Installation
$ npm install --save-dev @babel/plugin-proposal-pipeline-operator
Usage
With a configuration file (Recommended)
{
"plugins": [["@babel/plugin-proposal-pipeline-operator", { "proposal": "minimal" }]]
}
The Pipeline Proposal is one of three competing implementations. Which implementation the plugin should use is configured with the "proposal"
option. This option is required and should be one of:
-
"minimal"
– Minimal Pipeline -
"smart"
- Smart Pipeline - Added inv7.3.0
-
"fsharp"
- F#-Style Pipeline - Added inv7.5.0
When one of the implementations is accepted, it will become the default and the "proposal"
option will no longer be required.
Via CLI
$ babel --plugins @babel/plugin-proposal-pipeline-operator script.js
Via Node API
require("@babel/core").transform("code", {
plugins: [
[
"@babel/plugin-proposal-pipeline-operator",
{
"proposal": "minimal"
}
]
]
});