Edit this page

up.Params up.Params.fromURL(url)
Class method

This feature is experimental. It may be changed or removed in a future version.

Constructs a new up.Params instance from the given URL's query string.

Constructs an empty up.Params instance if the given URL has no query string.

Example

var params = up.Params.fromURL('http://foo.com?foo=fooValue&bar=barValue')
var foo = params.get('foo')
// foo is now: 'fooValue'

Parameters

url string

The URL from which to extract the query string.

Return value

stringorundefined

The given URL's query string, or undefined if the URL has no query component.