* Get the LINKER_PARAM(name, id) value from url and clean the value * @param {string} name * @param {string} id * @return {?string}
(name, id)
| 29 | * @return {?string} |
| 30 | */ |
| 31 | get(name, id) { |
| 32 | if (!name || !id) { |
| 33 | user().error(TAG, 'LINKER_PARAM requires two params, name and id'); |
| 34 | return null; |
| 35 | } |
| 36 | |
| 37 | if (!hasOwn(this.linkerParams_, name)) { |
| 38 | this.linkerParams_[name] = this.parseAndCleanQueryString_(name); |
| 39 | } |
| 40 | |
| 41 | if (this.linkerParams_[name] && this.linkerParams_[name][id]) { |
| 42 | return this.linkerParams_[name][id]; |
| 43 | } |
| 44 | |
| 45 | return null; |
| 46 | } |
| 47 | |
| 48 | /** |
| 49 | * Parse the url get the key value pair for the linker name |
no test coverage detected