JSPM

  • Created
  • Published
  • Downloads 32128396
  • Score
    100M100P100Q232628F
  • License MIT

Normalize a URL

Package Exports

  • normalize-url

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (normalize-url) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

normalize-url Build Status

Normalize a URL

Useful when you need to display, store, deduplicate, sort, compare, etc, URLs.

Install

$ npm install --save normalize-url

Usage

var normalizeUrl = require('normalize-url');

normalizeUrl('sindresorhus.com');
//=> http://sindresorhus.com

normalizeUrl('HTTP://xn--xample-hva.com:80/?b=bar&a=foo');
//=> http://êxample.com/?a=foo&b=bar

License

MIT © Sindre Sorhus