Skip to content

Experience-Monks/url-trim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

trims query and hash parameters off a URL

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published