getNPMVersion

Get the version of an npm package from the registry.

Uses the npm tag from NPMPackageOptions.tag (default latest). When NPMPackageOptions.fetch is true, fetches registry.npmjs.org directly instead of running npm view. The result also contains the archive URL in file.