Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
layer8
on Jan 20, 2023
|
parent
|
context
|
favorite
| on:
Pipe Operator (|>) For JavaScript
It’s a horizontal pipe. It arguably actually makes more sense when the values flow horizontally from left to right through the pipe.
In an alternative universe, Unix shell syntax may have used “—“ instead of “|” for piping.
layer8
on Jan 20, 2023
[–]
PS: The commands in Unix pipes are executed in parallel, and “|” could be interpreted as a mnemonic of that fact. However, the same is not true for the programming-language feature discussed here, which only processes singular values, not streams.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
In an alternative universe, Unix shell syntax may have used “—“ instead of “|” for piping.