zackpi.bsky.social
@zackpi.bsky.social
Blursed shorthands for deranged JS coders:

counting:
arr.reduce((c, v) => c + (fn(v) ? 1 : 0), 0) == arr.filter(fn).length

number parsing:
parseInt("123") == eval("123")
parseFloat("1.23") == eval("1.23")

cast to integer:
Math.trunc(1.23) == ~~1.23
December 8, 2024 at 3:36 PM
Reposted
Welp, since BlueSky has video now, I'll post my most well known edit.
That's right, we're gonna cheat.
October 19, 2024 at 2:09 AM