Coder Social home page Coder Social logo

builtin-modules's Introduction

builtin-modules

List of the Node.js builtin modules

The list is just a JSON file and can be used anywhere.

Install

$ npm install builtin-modules

Usage

const builtinModules = require('builtin-modules');

console.log(builtinModules);
//=> ['assert', 'buffer', ...]

API

Returns an array of builtin modules fetched from the running Node.js version.

Static list

This module also comes bundled with a static array of builtin modules generated from the latest Node.js version. You can get it with require('builtin-modules/static');

Related


Get professional support for this package with a Tidelift subscription
Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies.

builtin-modules's People

Contributors

addaleax avatar bendingbender avatar coreyfarrell avatar eventualbuddha avatar kevva avatar shiyafei avatar sindresorhus avatar yash-singh1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

builtin-modules's Issues

Why is 'wasi' module not displayed?

I have a small question.
When I use the package, the wasi module was not included in the list.
But the builtin-modules.json is including it.
What is this difference?

TypeScript lib checking errors using this module

I'm using the latest TypeScript version 3.5.3 and I'm getting the following errors:

node_modules/builtin-modules/index.d.ts(12,40): error TS1005: ',' expected.
node_modules/builtin-modules/index.d.ts(12,46): error TS1005: ',' expected.

The import I'm using is import * as builtinModules from 'builtin-modules'; and the option skipLibCheck is disabled so the compiler is checking for correct typing files.

The line it complains about is the following:

declare const builtinModules: readonly string[];

It looks like the reason is that the const is additionally declared as readonly which TypeScript apperantly doesn't like. Removing the readonly fixes the error for me.

`fs/promises`

Is the exclusion of fs/promises deliberate for some reason in excluding /?

Thanks!

Update list?

List is frm 3 years old, maybe it would be possible to update it and configure an automated process to keep it updated with latest versions? :-)

Missing some builtins

These are builtin modules that are part of the undocumented "private" core API but are unfortunately shimmed in browserify, and some module authors continue to prefer them over the public builtins because using them shaves a few kb off of their bundle size:

_stream_duplex
_stream_passthrough
_stream_readable
_stream_transform
_stream_writable

My root problem is that my test-runner, jest, does not recognize _stream_transform as a core module and breaks as a result. You can see I originally tried to fix it here in the module that requires _stream_transform, but as switching from _stream_transform to stream would have increased the bundle size, I am now looking for other solutions. If you are willing to add them to this module that would be great. If not (for whatever reason) I will approach jest-resolve and see if it can be addressed there.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.