Socket
Socket
Sign inDemoInstall

builtin-modules

Package Overview
Dependencies
0
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Protect your apps from supply chain attacks

Install

builtin-modules

List of the Node.js builtin modules

    3.3.0latest
    GitHub
    npm

Version published
Maintainers
1
Weekly downloads
12,977,268
increased by2.97%

Weekly downloads

Package description

What is builtin-modules?

The builtin-modules package provides a list of the modules that come pre-packaged with Node.js. These are modules that you can require in your code without needing to install them separately, as they are built into the Node.js runtime. This package is useful for developers who want to ensure they are using only core modules or need to check if a module name corresponds to a built-in module.

What are builtin-modules's main functionalities?

List of all builtin modules

This feature allows you to retrieve an array of all the builtin module names in Node.js. The code sample shows how to require the package and log the list of module names to the console.

const builtinModules = require('builtin-modules');
console.log(builtinModules);

List of builtin modules as of a specific Node.js version

This feature provides a list of builtin modules for a specific version of Node.js. The 'static' import gives you a list that corresponds to a particular Node.js release, which is useful when working with environments that may not be up-to-date with the latest Node.js version.

const builtinModules = require('builtin-modules/static');
console.log(builtinModules);

Other packages similar to builtin-modules

Readme

Source

builtin-modules

List of the Node.js builtin modules

The list is just a JSON file and can be used anywhere.

Install

$ npm install builtin-modules

Usage

const builtinModules = require('builtin-modules');

console.log(builtinModules);
//=> ['assert', 'buffer', ...]

API

Returns an array of builtin modules fetched from the running Node.js version.

Static list

This module also comes bundled with a static array of builtin modules generated from the latest Node.js version. You can get it with require('builtin-modules/static');

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

Get professional support for this package with a Tidelift subscription
Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies.

Keywords

FAQs

Last updated on 12 May 2022

Did you know?

Socket installs a GitHub app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc