Socket
Socket
Sign inDemoInstall

@pnpm/pkgid-to-filename

Package Overview
Dependencies
Maintainers
2
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pnpm/pkgid-to-filename

Converts a package ID to a valid file name


Version published
Weekly downloads
3
decreased by-82.35%
Maintainers
2
Weekly downloads
 
Created
Source

@pnpm/pkgid-to-filename

Converts a package ID to a valid file name

npm version Build Status

Most package IDs are already unique and valid filenames, so only the package IDs of local dependencies are converted.

Installation

npm i -S @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

Keywords

FAQs

Package last updated on 19 Apr 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc