Babel
  • Docs
  • Setup
  • Try it out
  • Videos
  • Blog
  • Donate
  • Team
  • GitHub
Edit

@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 in v7.3.0
  • "fsharp" - F#-Style Pipeline - Added in v7.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"
      }
    ]
  ]
});
  • Installation
  • Usage
    • With a configuration file (Recommended)
    • Via CLI
    • Via Node API
Babel
Docs
Learn ES2015
Community
VideosUser ShowcaseStack OverflowSlack ChannelTwitter
More
BlogGitHub OrgGitHub RepoWebsite RepoOld 6.x SiteOld 5.x Site