@pnpm/pkgid-to-filename
v3.0.0
Published
Converts a package ID to a valid file name
Downloads
80
Readme
@pnpm/pkgid-to-filename
Converts a package ID to a valid file name
Installation
<pnpm|npm|yarn> add @pnpm/pkgid-to-filename
Usage
'use strict'
const pkgIdToFilename = require('@pnpm/pkgid-to-filename').default
pkgIdToFilename('file:./test')
//> local/%2Fhome%2Fzkochan%2Fsrc%2Fpnpm%2Fpkgid-to-filename%2Ftest
No changes are done for package ID of non-local package.
pkgIdToFilename('registry.npmjs.org/foo/1.0.0')
//> registry.npmjs.org/[email protected]