NPM Smell 🍑💨

trivial and outdated NPM packages

is-core-module outdated npm logo

Checks if a specifier is a core Node.js module

Weekly Downloads
46,574,320
Dependencies
2
Latest Release
a year ago
Switch to the native implementation.
Outdated
First version with native support
Node.js 0.6.13
added to Node.js
14 years ago

Dependency Tree

  • is-core-module @2.16.1 (2)
    • hasown @2.0.2 (1)
      • function-bind @1.1.2

Only use this package if you want to check against a specific Node.js version.

If you just want to check if a module is a core module in the current Node.js version, you can use module.builtinModules:

import { builtinModules } from "node:module";

console.log(builtinModules.includes("fs"));
//=> true
console.log(builtinModules.includes("express"));
//=> false