←back to thread

13 points javatuts | 1 comments | | HN request time: 0.21s | source
Show context
npodbielski ◴[] No.45844315[source]

   const result = data
     |> Object.entries(%)
     |> (%.filter(([k, v]) => v != null))
     |> Object.fromEntries(%)
     |> Object.values(%)
     |> JSON.stringify(%)
     |> encodeURIComponent(%);
Looks kinda awful to me. Am I strange that I prefer the 'spaghetti' version?
replies(1): >>45844324 #
1. samhh ◴[] No.45844324[source]
I’ll die on the hill that the tacit pipe operator would have been the right choice. IIRC the main objections came from engine implementors.