🚀 Big News:Socket Has Acquired Secure Annex.Learn More →
Socket
Book a DemoSign in
Socket

is-builtin-module

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

is-builtin-module

Check if a string matches the name of a Node.js builtin module

latest
Source
npmnpm
Version
5.0.0
Version published
Weekly downloads
7.7M
-18.89%
Maintainers
1
Weekly downloads
 
Created
Source

is-builtin-module

Check if a string matches the name of a Node.js builtin module

Note that this matches based a static list of modules from the latest Node.js version. If you want to check for a module in the current Node.js, use the core isBuiltin method.

Install

npm install is-builtin-module

Usage

import isBuiltinModule from 'is-builtin-module';

isBuiltinModule('fs');
//=> true

isBuiltinModule('fs/promises');
//=> true

isBuiltinModule('node:fs/promises');
//=> true

isBuiltinModule('unicorn');
//=> false
  • builtin-modules - A static list of the Node.js builtin modules from the latest Node.js version

Keywords

builtin

FAQs

Package last updated on 27 Feb 2025

Did you know?

Socket

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.

Install

Related posts