Constructor
new RouteParams(paramsopt, queryopt)
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
params | object | <optional> | {} | |
query | object | <optional> | {} |
- Source
Methods
getParam(key, defaultValueopt) → {*|null}
Get param value by given key. If key does not exists, the defaultValue is returned
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
key | string | Param key | ||
defaultValue | * | | <optional> | null | The default return value if given key does not exists |
- Source
Returns:
- Type:
- * |
null
getParams() → {Object}
Get param object
- Source
Returns:
- Type:
- Object
getQueries() → {Object}
Get query object
- Source
Returns:
- Type:
- Object
getQuery(key, defaultValueopt) → {*|null}
Get query value by given key. If key does not exitss, the defaultValue is returned
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
key | string | Query key | ||
defaultValue | * | | <optional> | null | The default return value if given key does not exists |
- Source
Returns:
- Type:
- * |
null