url.relative

0.2.1 • Public • Published

url.relative

Get a relative path from one URL to another URL.

Installation

npm install --save url.relative

Example

var relative = require('url.relative');

from    = 'http://example.com/foo/bar';
to      = 'http://example.com/style.css';

relative(from, to) // ==> '../style.css'

Readme

Keywords

Package Sidebar

Install

npm i url.relative

Weekly Downloads

4

Version

0.2.1

License

none

Last publish

Collaborators

  • jameslnewell