You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

base-modules

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

base-modules

list of node.js built-in modules

1.0.1
latest
Source
npmnpm
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

base-modules

List of Node.js built-in modules.

Features:

  • Returns a list of built-in modules based on version.
  • Supports Node.js v4.0.0 and above.

Install

npm i base-modules

Usage

const modules = require('base-modules');

Get list of modules for your current Node.js version:

modules().includes('http'); // <= true

Get list of modules for specific Node.js version:

modules('9.0.0').includes('fs/promises'); // <= false

Get list of modules without specifying any version:

modules('*').includes('node:test'); // <= true

A static list of all modules:

require('base-modules/static'); // ['assert', 'fs', ...]

License

MIT 💖

Keywords

core

FAQs

Package last updated on 17 Oct 2023

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