crypto icon indicating copy to clipboard operation
crypto copied to clipboard

module name "crypto" conflicts with node's own "crypto" module

Open 525c1e21-bd67-4735-ac99-b4b0e5262290 opened this issue 12 years ago • 4 comments

I'll try to convince nodejs folks to allow shadowing built-in modules with dependencies. It looks like there is no other reason than legacy for node to look in node/lib/ before package/node_modules/.

Gozala avatar May 07 '12 19:05 Gozala

How would you imagine being able to require() the built-in crypto if this module is found as well?

mscdex avatar Mar 04 '13 01:03 mscdex

Is there a point to using this lib instead of the native one? Now I'm confused

charleshross avatar May 12 '14 14:05 charleshross

@charleshross not if you're using node. These crypto functions were implemented entirely in JavaScript so my guess is that they were intended to be some kind of API-compatible version of node's built-in crypto module, but for the browser. Nowadays for that kind of situation there's a start of a module for browserify here.

mscdex avatar May 12 '14 14:05 mscdex