@babel/plugin-proposal-pipeline-operator
Usage
If "proposal"
is omitted, or if "proposal": "hack"
is used, then a "topicToken": "^^"
, "topicToken": "^"
, or "topicToken": "#"
option must also be included.
The "proposal": "minimal"
, "fsharp"
, and options are deprecated and subject to removal in a future major version.
The following examples use topicToken: "^^"
.
// Status quo
console.log(
chalk.dim(
`$ ${Object.keys(envars)
.join(' ')}`,
'node',
args.join(' ')
)
);
// With pipes
Object.keys(envars)
.map(envar => `${envar}=${envars[envar]}`)
.join(' ')
|> chalk.dim(^^, 'node', args.join(' '))
|> console.log(^^);
From .
(For a summary of deprecated proposal modes’ behavior, see the pipe wiki’s table of previous proposals.)
With ^^
topic token:
{
"plugins": [
["@babel/plugin-proposal-pipeline-operator", { "topicToken": "^^" }]
]
}
Because this plugin requires a configuration option, it . Use a config file instead with the CLI, to add and configure this plugin.
With ^^
topic token:
require("@babel/core").transformSync("code", {
plugins: [
[ "@babel/plugin-proposal-pipeline-operator", { topicToken: "^^" } ],
});
With @@
topic token: