raszi / node-tmp

Temporary file and directory creator for node.js
MIT License
736 stars 92 forks source link

fix: avoid relying on Node’s internals #166

Closed addaleax closed 6 years ago

addaleax commented 6 years ago

process.binding() is an internal API of Node, and its use should be avoided.

Modern versions of Node have constants properties on the individual public modules, so using these and falling back to the process.binding() path ensures that this module is unaffected by changes to Node’s internals.