Edit this page

up.Params up.Params.prototype.add(name, value)
Class method

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

Adds a new entry with the given name and value.

An up.Params instance can hold multiple entries with the same name. To overwrite all existing entries with the given name, use up.Params#set() instead.

Example

var params = new up.Params()
params.add('foo', 'fooValue')

var foo = params.get('foo')
// foo is now 'fooValue'

Parameters

name string

The name of the new entry.

value any

The value of the new entry.