async function

getPackageManifest

(__namedParameters,[object Object]): Promise<PackageManifest>
getPackageManifest returns the manifest describing a specific version of a package.

Examples

Get the latest manifest for package query-registry from the npm registry:
import { getPackageManifest } from 'query-registry';

(async () => {
    const manifest = await getPackageManifest({ name: 'query-registry' });

    // Output: 'query-registry'
    console.log(manifest.name);
})();
Get the manifest for package query-registry@1.0.0 from the npm registry:
import { getPackageManifest } from 'query-registry';

(async () => {
    const manifest = await getPackageManifest({ name: 'query-registry', version: '1.0.0' });

    // Output: 'query-registry'
    console.log(manifest.name);

    // Output: '1.0.0'
    console.log(manifest.version);
})();