is-builtin-module

  • Version 3.2.0
  • Published
  • 3.83 kB
  • 1 dependency
  • MIT license

Install

npm i is-builtin-module
yarn add is-builtin-module
pnpm add is-builtin-module

Overview

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

Index

Functions

function isBuiltinModule

isBuiltinModule: (moduleName: string) => boolean;
  • Returns true if the given moduleName is a Node.js builtin module, false otherwise.

    Parameter moduleName

    The name of the module.

    Example 1

    import isBuiltinModule = require('is-builtin-module');
    isBuiltinModule('fs/promises');
    //=> true
    isBuiltinModule('node:fs');
    //=> true
    isBuiltinModule('unicorn');
    //=> false

Package Files (1)

Dependencies (1)

Dev Dependencies (3)

Peer Dependencies (0)

No peer dependencies.

Badge

To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/is-builtin-module.

  • Markdown
    [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/is-builtin-module)
  • HTML
    <a href="https://www.jsdocs.io/package/is-builtin-module"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>