
Product
Introducing Module Reachability: Focus on the Vulnerabilities That Matter
Module Reachability filters out unreachable CVEs so you can focus on vulnerabilities that actually matter to your application.
is-bun-module
Advanced tools
A utility library to check if a module is a Bun built-in module or a Node.js module implemented in Bun.
isBunModule(moduleName, bunVersion?)
Checks if a specifier is a Bun module.
import { isBunModule } from "is-bun-module";
isBunModule("bun"); // true
isBunModule("bun:test", "1.0.0"); // true
isBunModule("notBunModule"); // false
isBunImplementedNodeModule(moduleName, bunVersion?)
Checks if a specifier is a Node module implemented in Bun.
import { isBunImplementedNodeModule } from "is-bun-module";
isBunImplementedNodeModule("fs"); // true
isBunImplementedNodeModule("node:fs"); // true
isBunImplementedNodeModule("node:notNodeModule"); // false
isBunImplementedNodeModule("node:http2", "1.0.0"); // false, added in 1.0.13
isBunBuiltin(moduleName, bunVersion?)
Checks if a specifier is either a Bun module or a Node.js module implemented in Bun.
import { isBunBuiltin } from "is-bun-module";
isBunBuiltin("bun"); // true
isBunBuiltin("fs"); // true
isBunBuiltin("notBunModule"); // false
getBunModules(bunVersion?)
Returns an array of all Bun modules available in the specified version.
import { getBunModules } from "is-bun-module";
getBunModules(); // ["bun", "bun:ffi", ...]
getBunModules("1.0.0"); // Returns modules available in version 1.0.0
getBunImplementedNodeModules(bunVersion?)
Returns an array of all Node.js modules implemented in Bun for the specified version.
import { getBunImplementedNodeModules } from "is-bun-module";
getBunImplementedNodeModules(); // ["fs", "path", ...]
getBunImplementedNodeModules("1.0.0"); // Returns implemented Node.js modules in version 1.0.0
getBunBuiltinModules(bunVersion?)
Returns an array of all builtin modules (both Bun modules and implemented Node.js modules).
import { getBunBuiltinModules } from "is-bun-module";
getBunBuiltinModules(); // ["bun", "bun:ffi", "fs", "path", ...]
latest
as Bun versionFAQs
Is this specifier a Bun core module or supported Node one?
The npm package is-bun-module receives a total of 6,241,078 weekly downloads. As such, is-bun-module popularity was classified as popular.
We found that is-bun-module demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Module Reachability filters out unreachable CVEs so you can focus on vulnerabilities that actually matter to your application.
Company News
Socket is bringing best-in-class reachability analysis into the platform — cutting false positives, accelerating triage, and cementing our place as the leader in software supply chain security.
Product
Socket is introducing a new way to organize repositories and apply repository-specific security policies.