Global 'crypto' object could conflict with Node REPL
be aware that the default node repl exposes builtin modules as globals and crypto is the name of one of them.
$ echo 'typeof globalThis.crypto' | node -i
Welcome to Node.js v12.13.1.
Type ".help" for more information.
> typeof globalThis.crypto
'object'
Originally posted by @bmeck in https://github.com/tc39-transfer/proposal-csprng/pull/2#issuecomment-582939183
cc: @ljharb
I imagine there's a number of ways to address this in Node. For example: Given that its the REPL and almost guaranteed to have a developer actively interacting with the REPL, Node could chose to make their built-in crypto module available via both a crypto global and a nodeCrypto global, with a deprecation warning issued when crypto is referenced in the REPL (similar to other existing deprecation warnings issued in Node today).
I'm sure someone from Node could weigh in on this with their thoughts and concerns.
For one, since this is just in the repl, it won't break any code, it just might confuse some users. However, require('crypto') would continue to work in the node repl.
Maybe put it on Math where random already lives?