Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

babel-plugin-pipe-operator-curry

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-pipe-operator-curry

Alternative to babel-plugin-pipe-operator

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-90.91%
Maintainers
1
Weekly downloads
 
Created
Source

babel-plugin-pipe-operator-curry

This work is an alternative to babel-plugin-pipe-operator. I choosed to implement pipe operator with the currying way instead of putting flow as the first callable arguments.

Examples

import { mean, round } from 'lodash';

const array = [1, 2, 3, 4, 5];

array
| mean
| round

Turn into

import { mean, round } from 'lodash';

const array = [1, 2, 3, 4, 5];

round(mean(array))

Disabling in current scope

If you want to use the original pipe operator, you can disable this plugin in current scope (and it children scopes) using "no pipe" directive as described in the original one.

Installation

$ npm install --save-dev babel-plugin-pipe-operator-curry

Usage

.babelrc

{
  "plugins": ["pipe-operator-curry"]
}

Via CLI

$ babel --plugins pipe-operator-curry script.js

Via Node API

require("babel-core").transform("code", {
  plugins: ["pipe-operator-curry"]
});

License

MIT

Keywords

FAQs

Package last updated on 16 Sep 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc