Fetches CDN usage statistics for this package from jsDelivr.
CDN stats reflect real browser/frontend usage, complementing npm download counts which measure install-time usage.
GET /package/npm/{name}/stats/{groupBy}/{period} (via data.jsdelivr.com/v1)
Group results by 'version' (default) or 'date'
Time period: 'day', 'week', 'month' (default), or 'year'
Optionalsignal: AbortSignalOptional AbortSignal to cancel the request
CDN hit counts, bandwidth, rank, and breakdown by version or date
Fetches all dist-tags for this package.
GET /-/package/{name}/dist-tags
Optionalsignal: AbortSignalOptional AbortSignal to cancel the request
A map of tag names to version strings
Fetches the per-day download breakdown for this package over a given period.
GET /downloads/range/{period}/{name} (via api.npmjs.org)
Named period or date range (default: 'last-month')
Optionalsignal: AbortSignalOptional AbortSignal to cancel the request
Download range data with a per-day array
Fetches the total download count for this package over a given period.
GET /downloads/point/{period}/{name} (via api.npmjs.org)
Named period or date range (default: 'last-month')
Optionalsignal: AbortSignalOptional AbortSignal to cancel the request
Download point data including total count and date range
Fetches the full packument (all versions metadata) for this package.
GET /{name}
Optionalsignal: AbortSignalOptional AbortSignal to cancel the request
The full packument object
Returns a VersionResource for the latest dist-tag.
Shorthand for .version('latest').
A chainable version resource pointing to latest
Fetches the current maintainers of this package.
Internally fetches the packument and returns the maintainers array.
GET /{name}
Optionalsignal: AbortSignalOptional AbortSignal to cancel the request
Array of maintainer entries (name, email, url)
Fetches the quality, maintenance, and popularity score for this package from npms.io.
Returns a detailed breakdown of each score component, including test coverage, release frequency, community interest, and dependent package count.
GET /package/{name} (via api.npms.io/v2)
Optionalsignal: AbortSignalOptional AbortSignal to cancel the request
Detailed score and evaluation data
Fetches the publish size and full install size (including all transitive dependencies) for the latest version of this package from Packagephobia.
GET /v2/api.json?p={name} (via packagephobia.com)
Optionalsignal: AbortSignalOptional AbortSignal to cancel the request
Publish and install size in bytes, file counts, and human-readable strings
Allows the resource to be awaited directly, resolving with the full packument. Delegates to PackageResource.get.
Optionalonfulfilled: null | (value: NpmPackument) => TResult1 | PromiseLike<TResult1>Optionalonrejected: null | (reason: unknown) => TResult2 | PromiseLike<TResult2>Returns a VersionResource for a specific version, which can be awaited directly or chained.
Version string (e.g. '18.2.0') or dist-tag (e.g. 'latest')
A chainable version resource
Fetches all published versions of this package as an ordered array.
Internally fetches the packument and converts the versions map to an array
sorted from oldest to newest.
GET /{name}
Optionalsignal: AbortSignalOptional AbortSignal to cancel the request
Array of version manifests sorted by publication order
Represents an npm package resource, providing access to package metadata, versions, dist-tags, and download statistics.
Implements
PromiseLike<NpmPackument>so it can be awaited directly to fetch the full packument, while also exposing sub-resource methods.Example