Writing some javascript today. I've given up on comma-first, but I still like semicolons.
-
-
Replying to @polotek
Native promises work in node. Never used them before, but I looked up the docs and got it right the first time. For whatever that's worth.
1 reply 0 retweets 14 likes -
Replying to @polotek
Here's my snippet to get all of the users in a slack channel. Feel free to bikeshed.pic.twitter.com/J7hUDQKZZx
7 replies 0 retweets 28 likes -
Replying to @polotek
I should've paid attention to how long this took me. No longer than an hour from start to finish. Where the start equals installing node.
1 reply 0 retweets 4 likes -
Replying to @polotek
I already had a slack token available. Found an npm module then used the slack api docs to bang this out.
1 reply 0 retweets 2 likes -
Replying to @polotek
Here's the same code using promises and the "promisify" utility in node. It's shorter, though not by much. And less clear IMO.pic.twitter.com/ipzAcXzUaR
2 replies 0 retweets 3 likes -
Replying to @polotek
Convert to async/await; it'll shorten that by a *ton*.
1 reply 0 retweets 1 like
I can do it if you've got that in a gist somewhere.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
& Web Standards TL; Blink API OWNER
Named PWAs w/
DMs open. Tweets my own; press@google.com for official comms.