lukehaas / RunJS

RunJS is a JavaScript playground for macOS, Windows and Linux. Write code with instant feedback and access to Node.js and browser APIs.
https://runjs.app
2.01k stars 43 forks source link

Bug: crypto.randomUUID is not a function #534

Closed Biki-das closed 1 year ago

Biki-das commented 1 year ago

crypto.randomUUID is not a function ? runs on node and browser but runjs throws typeerror?

lukehaas commented 1 year ago

@Biki-das you need to import crypto:

import crypto from 'crypto';

crypto.randomUUID();