is-builtin-module
Check if a string matches the name of a Node.js builtin module
Last updated a year ago by sindresorhus .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install is-builtin-module 
SYNC missed versions from official npm registry.

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

Related

  • builtin-modules - A static list of the Node.js builtin modules from the latest Node.js version

Current Tags

  • 5.0.0                                ...           latest (a year ago)

8 Versions

  • 5.0.0                                ...           a year ago
  • 4.0.0                                ...           2 years ago
  • 3.2.1                                ...           3 years ago
  • 3.2.0                                ...           4 years ago
  • 3.1.0                                ...           5 years ago
  • 3.0.0                                ...           8 years ago
  • 2.0.0                                ...           8 years ago
  • 1.0.0                                ...           11 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 3
Dependencies (1)
Dev Dependencies (3)

Copyright 2013 - present © cnpmjs.org | Home |