@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: "^^".

    1. // Status quo
    2. console.log(
    3. chalk.dim(
    4. `$ ${Object.keys(envars)
    5. .join(' ')}`,
    6. 'node',
    7. args.join(' ')
    8. )
    9. );
    10. // With pipes
    11. Object.keys(envars)
    12. .map(envar => `${envar}=${envars[envar]}`)
    13. .join(' ')
    14. |> chalk.dim(^^, 'node', args.join(' '))
    15. |> console.log(^^);

    From .

    (For a summary of deprecated proposal modes’ behavior, see the pipe wiki’s table of previous proposals.)

    With ^^ topic token:

    1. {
    2. "plugins": [
    3. ["@babel/plugin-proposal-pipeline-operator", { "topicToken": "^^" }]
    4. ]
    5. }

    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:

    1. require("@babel/core").transformSync("code", {
    2. plugins: [
    3. [ "@babel/plugin-proposal-pipeline-operator", { topicToken: "^^" } ],
    4. });

    With @@ topic token: