News for hackers. Stuff that matters.
Re:Pipe Operator (|>) For JavaScript by 8note on Friday January 20, 2023 @03:43PM (#34459638)
I'm trying to compare this to the jQuery kinda syntax

X

.this()

.that()

.then()

.do()

.a()

.thing()

And I expect this to let me keep that chain going for when I need to run a static function against the chain

X

.this()

.that()

.then()

.do()

.a()

.thing()

|>JSON.stringify(%)

Re:Pipe Operator (|>) For JavaScript by mkl on Friday January 20, 2023 @05:35PM (#34461055)
To format code as code, indent two spaces: https://news.ycombinator.com/formatdoc