not_IO@lemmy.blahaj.zone to Programmer Humor@programming.devEnglish · 14 hours agoPOV: You maintain a JS library that 80% of modern web infrastructure uses as a dependency.lemmy.blahaj.zoneimagemessage-square43fedilinkarrow-up1354arrow-down11
arrow-up1353arrow-down1imagePOV: You maintain a JS library that 80% of modern web infrastructure uses as a dependency.lemmy.blahaj.zonenot_IO@lemmy.blahaj.zone to Programmer Humor@programming.devEnglish · 14 hours agomessage-square43fedilink
minus-squarebleistift2@sopuli.xyzlinkfedilinkEnglisharrow-up6·6 hours agoYou can, but you shouldn’t. You don’t know what else relies on Math.random. That’s why there’s the wrapper function. That you can override in unit tests without worrying about other, unrelated code.
You can, but you shouldn’t. You don’t know what else relies on Math.random. That’s why there’s the wrapper function. That you can override in unit tests without worrying about other, unrelated code.