@babel/plugin-proposal-pipeline-operator

Installation

  1. $ npm install --save-dev @babel/plugin-proposal-pipeline-operator

Usage

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

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:

When one of the implementations is accepted, it will become the default and the "proposal" option will no longer be required.

Via CLI

  1. $ babel --plugins @babel/plugin-proposal-pipeline-operator script.js

Via Node API

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