Pipeline operator

An ES2020 proposal is in the works to include more FP concepts such as easy function chaining using a pipeline operator. Thus, chaining functions will be made much simpler. Instead of doing something similar to this:

const text = capitalize(myClean(myTrim(' hAhaHAhA ')));

We would only need to do this:

const text = ' hAhaHAhA '|> myTrim|> myClean|> capitalize

Get Mastering The Faster Web with PHP, MySQL, and JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.