@pnpm/pkgid-to-filename
TypeScript icon, indicating that this package has built-in type declarations

3.0.0 • Public • Published

@pnpm/pkgid-to-filename

Converts a package ID to a valid file name

npm version Build Status

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/foo@1.0.0

License

MIT © Zoltan Kochan

Package Sidebar

Install

npm i @pnpm/pkgid-to-filename

Weekly Downloads

3

Version

3.0.0

License

MIT

Unpacked Size

3.82 kB

Total Files

5

Last publish

Collaborators

  • pnpmuser
  • zkochan