
Product
Introducing Webhook Events for Pull Request Scans
Add real-time Socket webhook events to your workflows to automatically receive pull request scan results and security alerts in real time.
url-relative
Advanced tools
calculate RFC 1808 relative URLs (inverse of url.resolve)
var urlRelative = require('url-relative')
urlRelative('http://foo.com/a/b','http://foo.com/c/d')
// => '../c/d'
urlRelative('/a/b', '/a/b/c')
// => 'b/c'
urlRelative : (from : String, to : String) => String
Returns the shortest relative URL difference between a from
and a to
URL. Relative URLs are described in RFC 1808.
from
and two
can be full URLs (e.g. http://foo.com/bar
), network location URLs (protocol-relative, e.g. //foo.com/bar
), or absolute path URLs (e.g. /bar
).
$ npm install url-relative
From package root:
$ npm install
$ npm test
ISC. (c) MMXV jden jason@denizac.org. See LICENSE.md
FAQs
calculate RFC 1808 relative URLs (inverse of url.resolve)
The npm package url-relative receives a total of 21 weekly downloads. As such, url-relative popularity was classified as not popular.
We found that url-relative demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Product
Add real-time Socket webhook events to your workflows to automatically receive pull request scan results and security alerts in real time.
Research
The Socket Threat Research Team uncovered malicious NuGet packages typosquatting the popular Nethereum project to steal wallet keys.
Product
A single platform for static analysis, secrets detection, container scanning, and CVE checks—built on trusted open source tools, ready to run out of the box.