7 ms·
It's about reading the code in a natural order. jquery style: a().b().c().d() However this isn't tree shakable. modern esm: d(c(b(a()))) this proposal: a()
by danielsju6 5y ago
It's about reading the code in a natural order.
jquery style: a().b().c().d()
However this isn't tree shakable.
modern esm: d(c(b(a())))
this proposal: a() |> b(%) |> c(%) |> d(%)
- lifthrasiir 5y agoI think this is a good summary of why pipeline operators are long sought, more so than the proposal. If you are not fundamentally against chaining calls, there is no fundamental reason to be against pipeline operators because it can be thought as a generalization of chaining with similar pros and cons.