not_IO@lemmy.blahaj.zone to Programmer Humor@programming.devEnglish · 8 天前POV: You maintain a JS library that 80% of modern web infrastructure uses as a dependency.lemmy.blahaj.zoneimagemessage-square50fedilinkarrow-up1472
arrow-up1472imagePOV: 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 · 8 天前message-square50fedilink
minus-squarebleistift2@sopuli.xyzlinkfedilinkEnglisharrow-up12·8 天前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.
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.