
Research
Security News
The Growing Risk of Malicious Browser Extensions
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
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,310,009 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.
Research
Security News
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.
Security News
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.