@pnpm/resolving.tarball-url
v1101.1.6
Published
Build and recognize the canonical tarball URL of an npm package
Readme
@pnpm/resolving.tarball-url
Build and recognize the canonical tarball URL of an npm package
Installation
pnpm add @pnpm/resolving.tarball-urlUsage
import {
getNpmTarballUrl,
isCanonicalRegistryTarballUrl,
} from '@pnpm/resolving.tarball-url'
const registry = 'https://registry.npmjs.org/'
getNpmTarballUrl('foo', '1.0.0', { registry })
//=> 'https://registry.npmjs.org/foo/-/foo-1.0.0.tgz'
isCanonicalRegistryTarballUrl(
'https://registry.npmjs.org/foo/-/foo-1.0.0.tgz',
{ name: 'foo', version: '1.0.0' },
registry
)
//=> trueLicense
MIT
