Closed 43081j closed 4 weeks ago
Node provides a list of built ins via builtinModules. We can test against this rather than including an extra (redundant) dependency.
builtinModules
In future, if we introduce a version constraint of node >=16, we can use isBuiltin which node provides:
>=16
isBuiltin
import {isBuiltin} from 'node:module'; isBuiltin('fs'); // true
Thanks!
Node provides a list of built ins via
builtinModules
. We can test against this rather than including an extra (redundant) dependency.In future, if we introduce a version constraint of node
>=16
, we can useisBuiltin
which node provides: