sindresorhus/is-builtin-module

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

JavaScript

63

23 commits

updated Sep 18, 2026

See the code

README

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
  • builtin-modules - A static list of the Node.js builtin modules from the latest Node.js version

sindresorhus/is-builtin-module

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

JavaScript

63

23 commits

updated Sep 18, 2026

See the code

README

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
  • builtin-modules - A static list of the Node.js builtin modules from the latest Node.js version

Project health

Overall

3.6/10

Maintained

0/10

Code review

2/10
OpenSSF Scorecard

Latest release

5.0.0 · Feb 27, 2025

Releases this year

0