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
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset