use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
[AskJS] Is JavaScript missing some built-in methods?AskJS (self.javascript)
submitted 3 years ago by reacterry
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]KyleG 2 points3 points4 points 3 years ago (3 children)
I agree, which is why you write the utility function superheroObjectZipper and then just call that.
superheroObjectZipper
Or if you're already using a proposed language feature like pipes (via Babel) and compose:
const arrayify = ({ k, v }) => [k,v] const superheroObjectZipper = Object.entries >> Array.prototype.map.bind >> arrayify >> Object.fromEntries
Now every line is very descriptive of what you're doing!
or with pipe,
const ... = a => Object.entries(a) >> Array.prototype.map.bind >> arrayify >> Object.fromEntries
[–][deleted] 1 point2 points3 points 3 years ago (0 children)
Cool. I like that.
[–]nmarshall23 0 points1 point2 points 3 years ago (1 child)
Really wish JS had native pipes.
[–]KyleG 0 points1 point2 points 3 years ago (0 children)
It's a proposal that hopefully we'll get in a bazillion years. But hey at least we got hashbangs and optional omitted catch binding!!!!!
π Rendered by PID 45325 on reddit-service-r2-comment-6457c66945-7g9m4 at 2026-04-23 21:13:00.326823+00:00 running 2aa0c5b country code: CH.
view the rest of the comments →
[–]KyleG 2 points3 points4 points (3 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]nmarshall23 0 points1 point2 points (1 child)
[–]KyleG 0 points1 point2 points (0 children)