mirror of
https://github.com/rhinstaller/node-cache.git
synced 2026-11-03 21:49:47 -09:00
| .. | ||
| node_modules | ||
| index.js | ||
| License | ||
| package.json | ||
| Readme.md | ||
builtins
List of node.js builtin modules.
Usage
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'))
License
MIT