https://github.com/digitaledgeit/js-url.relative
Get the relative path from one URL to another URL.
https://github.com/digitaledgeit/js-url.relative
Last synced: 8 months ago
JSON representation
Get the relative path from one URL to another URL.
- Host: GitHub
- URL: https://github.com/digitaledgeit/js-url.relative
- Owner: digitaledgeit
- Created: 2014-11-20T11:45:32.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2014-11-20T12:44:03.000Z (over 11 years ago)
- Last Synced: 2025-07-06T18:18:24.949Z (11 months ago)
- Language: JavaScript
- Size: 117 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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'