You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

url-trim

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

url-trim

trims query and hash parameters off a URL

1.0.0
latest
Source
npmnpm
Version published
Weekly downloads
33K
39.75%
Maintainers
1
Weekly downloads
 
Created
Source

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.

Keywords

url

FAQs

Package last updated on 24 Sep 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts