Latest Threat Research:Malicious dYdX Packages Published to npm and PyPI After Maintainer Compromise.Details
Socket
Book a DemoInstallSign in
Socket

repo-url-from-package

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

repo-url-from-package

Extracts the repo URL from a package.json object

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

repo-url-from-package

Extracts the repo URL from a package.json object

Install

npm install repo-url-from-package

Usage

import repoUrlFromPackage from 'repo-url-from-package';
import packageJson from './package.json' with {type: 'json'};

const {url} = repoUrlFromPackage(packageJson);

console.log(url);
//=> 'https://github.com/sindresorhus/repo-url-from-package'

API

repoUrlFromPackage(packageJson)

Returns an object with the possible parsed url and an array of any warnings.

packageJson

Type: object

A package.json object.

Keywords

repo

FAQs

Package last updated on 06 Jul 2025

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