What does the `npm i` command do?

What does the i command do in the npm CLI?

I saw it used like this:

npm i package

The i flag is an alias for install, so

npm i package

is the same as

npm install package

From the documentation:

npm install (with no args, in package dir)
npm install [<@scope>/]<name>
npm install [<@scope>/]<name>@<tag>
npm install [<@scope>/]<name>@<version>
npm install [<@scope>/]<name>@<version range>
npm install <alias>@npm:<name>
npm install <git-host>:<git-user>/<repo-name>
npm install <git repo url>
npm install <tarball file>
npm install <tarball url>
npm install <folder>

aliases: npm i, npm add
common options: [-P|--save-prod|-D|--save-dev|-O|--save-optional|--save-peer] [-E|--save-exact] [-B|--save-bundle] [--no-save] [--dry-run]

The i command is an alias for npm-install alias, which is mentioned in the docs.

You can use it with all npm-install flags. For example below I will install Angular and live-server using the npm i command:

npm i [email protected] -E
npm i live-server -D