My latest feature, auto-expanding details elements, has launched in stable Chrome 97! You can now use find-in-page to search the contents of closed details elements.
@natension In 2022 my SaaS will be there at like colleens or so I can get you a menu for the first time in the morning but I don't think it will be a good day for you to be there at like colleens or so I can do it for you to get home and get back to you on that one day
Truly insightful.
@SimonHoiberg Out of curiosity, I ran some benchmarks. All of the following produce the number 100.
+'100' - Fastest
Number('100') - 10.23% slower
parseInt('100', 10) - 71.17 % slower
parseInt('100') - 77.74% slower
@_charlie632@wesbos I found out recently that in nodejs v15+ you can do:
import { setTimeout as sleep } from 'timers/promises' // built-in package
await sleep(num);
Super cool and erases the need for writing the function yourself!
I heard you like Vercel ▲ swags — so here's a black friday giveaway
I'm giving a hoodie, a t-shirt and two mugs to a random person who retweets this tweet 🖤
(you gotta be following me obvs)
@BartBurgov @IAyeshaSahar To be fair, this can also be achieved using || since console.log() returns undefined:
[1, 2, 3].map((num) => console.log(num) || num * 2)
But that gives me an eslint error, so I prefer the other method.
@BartBurgov @IAyeshaSahar I find it great for debugging. If I had an array and I wanted to log each element as I mapped it, my code would look like:
[1, 2, 3].map((num) => {
console.log(num);
return num * 2
});
With comma:
[1, 2, 3].map((num) => (console.log(num), num * 2))