
Security News
TypeScript is Porting Its Compiler to Go for 10x Faster Builds
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
The 'builtins' npm package provides a list of Node.js built-in modules. It is useful for tools and libraries that need to know which modules are built into Node.js.
List all built-in modules
This feature allows you to retrieve a list of all built-in modules in Node.js. The code sample demonstrates how to use the 'builtins' package to log the list of built-in modules to the console.
const builtins = require('builtins');
console.log(builtins());
List built-in modules for a specific Node.js version
This feature allows you to retrieve a list of built-in modules for a specific version of Node.js. The code sample demonstrates how to use the 'builtins' package to log the list of built-in modules for Node.js version 10.0.0 to the console.
const builtins = require('builtins');
console.log(builtins('10.0.0'));
The 'node-builtins' package provides a list of Node.js built-in modules similar to 'builtins'. It is also used to identify built-in modules in Node.js, but it may have different methods or additional features.
The 'builtin-modules' package offers a list of Node.js built-in modules. It is similar to 'builtins' but may have a different API or additional functionalities. It is often used in bundlers and other tools that need to handle Node.js built-ins.
List of node.js builtin modules.
const builtins = require('builtins')
Get list of core modules for current Node.js version:
assert(builtins().includes('http'))
Get list of core modules for specific Node.js version:
assert(builtins({ version: '6.0.0' }).includes('http'))
Get list of core modules present in one or mode Node.js versions:
assert(builtins({ version: '*' }).includes('worker_threads'))
Add experimental modules to the list:
assert(builtins({ experimental: true }).includes('wasi'))
MIT
FAQs
List of node.js builtin modules
The npm package builtins receives a total of 8,416,696 weekly downloads. As such, builtins popularity was classified as popular.
We found that builtins demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.