Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

get-npm-tarball-url

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

get-npm-tarball-url - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

9

lib/index.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
function default_1(pkgName, pkgVersion, opts) {
const registry = opts && opts.registry || 'http://registry.npmjs.org';
const registry = normalizeRegistry(opts && opts.registry || 'http://registry.npmjs.org/');
const encodedName = getEncodedName(pkgName);
const scopelessName = getScopelessName(pkgName);
return `${registry}/${encodedName}/-/${scopelessName}-${pkgVersion}.tgz`;
return `${registry}${encodedName}/-/${scopelessName}-${pkgVersion}.tgz`;
}
exports.default = default_1;
function normalizeRegistry(registry) {
if (registry[registry.length - 1] === '/')
return registry;
return `${registry}/`;
}
function getEncodedName(name) {

@@ -11,0 +16,0 @@ if (name[0] === '@') {

{
"name": "get-npm-tarball-url",
"version": "1.0.0",
"version": "1.0.1",
"description": "Create the tarball URL of a npm package",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

Sorry, the diff of this file is not supported yet

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