Skip to content

Files

Latest commit

 

History

History

is-bun-module

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

is-bun-module

How to use

To check 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

To check if a specifier is a Node module supported by Bun:

import { isSupportedNodeModule } from "is-bun-module";
isSupportedNodeModule("fs"); // true
isSupportedNodeModule("node:fs"); // true
isSupportedNodeModule("node:notNodeModule"); // false
isSupportedNodeModule("node:http2", "1.0.0"); // false, added in 1.0.13

Notes