perry-mitchell / ulidx

ULID generator for NodeJS and the browser
MIT License
281 stars 17 forks source link

Alias node:crypto to stub when env is not node #25

Closed ranile closed 1 year ago

ranile commented 1 year ago

Previously, node:crypto was imported when environment was anything but browser. This PR makes it so it is only loaded in Node.

should fix #13, though I don't have a CF worker environment to test it on

perry-mitchell commented 1 year ago

Thanks @hamza1311!