not_IO@lemmy.blahaj.zone to Programmer Humor@programming.devEnglish · 1 month agoPOV: You maintain a JS library that 80% of modern web infrastructure uses as a dependency.lemmy.blahaj.zoneimagemessage-square51linkfedilinkarrow-up1482arrow-down11
arrow-up1481arrow-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 · 1 month agomessage-square51linkfedilink
minus-squarebleistift2@sopuli.xyzlinkfedilinkEnglisharrow-up12·1 month 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.