What is a npm package?
In general, Npm package is a folder containing a program described by a package.json file.
The folder usually contains files with source code, assets (images, videos, CSS files), documentation and other files.
- A package can also be called a module.
When someone refers to a package, he usually thinks about the folder with source files. However, the packages can be distributed in different forms:
- A package can be distributed as a gzipped archive.
- A package can be also a URL that points to gzipped archive.
For that reason, the package locaiton can be represented by
- Local path to a folder
- Local path to a gzipped archive
- URL to a gzipped archive
Related npm job interview questions
Where can you find modules that the npm installed globally after you executed the npm install -g command?npm Senior