Check if a string matches the name of a Node.js builtin module
$ npm install is-builtin-module
const isBuiltinModule = require('is-builtin-module');
isBuiltinModule('fs');
//=> true
isBuiltinModule('fs/promises');
//=> true
isBuiltinModule('node:fs/promises');
//=> true
isBuiltinModule('unicorn');
//=> false