Modules

    A module or package typically refers to a collection of JavaScript files.

    We use either the npm or yarn package managers to automatically download and manage versions of modules. A JavaScript project will have a node_modules directory containing the downloaded files.

    We typically download 3rd party library modules from the npm package registry.

    While npm is the Node.js package manager, we use it for all kinds of JavaScript projects, even those that don't use Node.js. Some packages, however, will only work in specific environments, e.g. Node.js, the web, React Native.