matthewp / url-relative

calculate RFC 1808 relative URLs (inverse of url.resolve)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

url-relative

Create relative paths from two URLs.

import { relative } from 'https://cdn.spooky.click/url-relative/1.0.0/mod.ts';

console.log(relative(
  new URL('http://example.com/a/b/c/d'),
  new URL('http://example.com/a/b/c/d/e')
));
// d/e

License

BSD-2-Clause

ezoic increase your site revenue

About

calculate RFC 1808 relative URLs (inverse of url.resolve)


Languages

Language:TypeScript 52.6%Language:JavaScript 47.4%