is-bun-module
Is this specifier a Bun core module or supported Node one?
Last updated 2 months ago by sunset_techuila .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install is-bun-module 
SYNC missed versions from official npm registry.

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

Current Tags

  • 1.2.1                                ...           latest (2 months ago)

5 Versions

  • 1.2.1                                ...           2 months ago
  • 1.2.0                                ...           2 months ago
  • 1.1.0                                ...           3 months ago
  • 1.0.2                                ...           5 months ago
  • 1.0.1                                ...           5 months ago
Maintainers (1)
Downloads
Total 0
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (16)

© 2010 - cnpmjs.org x YWFE | Home | YWFE