not_IO@lemmy.blahaj.zone to Programmer Humor@programming.devEnglish · 15 hours agoPOV: You maintain a JS library that 80% of modern web infrastructure uses as a dependency.lemmy.blahaj.zoneimagemessage-square45fedilinkarrow-up1370
arrow-up1370imagePOV: 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 · 15 hours agomessage-square45fedilink
minus-squarebleistift2@sopuli.xyzlinkfedilinkEnglisharrow-up6·7 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.