url-trim
trims query and hash parameters off a URL
Last updated 5 years ago by mattdesl .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install url-trim 
SYNC missed versions from official npm registry.

url-trim

stable

Trims query and hash parameters off of a URL.

Install

npm install url-trim --save

Example

var urlTrim = require('url-trim')

urlTrim('http://localhost:9966/?foo=bar')
//=> 'http://localhost:9966/'

urlTrim('/path/foo?blah#bar')
//=> '/path/foo'

Usage

NPM

trimmed = trim([url])

Trims the query string and hash parameters from a URL.

If url is empty or not a string, this method returns an empty string.

License

MIT, see LICENSE.md for details.

Current Tags

  • 1.0.0                                ...           latest (5 years ago)

1 Versions

  • 1.0.0                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 42
This Month 64
Last Day 14
Last Week 37
Last Month 191
Dependencies (0)
None
Dev Dependencies (3)

Copyright 2014 - 2016 © taobao.org |