(paramName, opts, params, asJson)
| 8212 | } |
| 8213 | |
| 8214 | function addHttpParam(paramName, opts, params, asJson) { |
| 8215 | // add an http param from opts to params, optionally json-encoded |
| 8216 | let val = opts[paramName]; |
| 8217 | if (typeof val !== 'undefined') { |
| 8218 | if (asJson) { |
| 8219 | val = encodeURIComponent(JSON.stringify(val)); |
| 8220 | } |
| 8221 | params.push(paramName + '=' + val); |
| 8222 | } |
| 8223 | } |
| 8224 | |
| 8225 | function coerceInteger(integerCandidate) { |
| 8226 | if (typeof integerCandidate !== 'undefined') { |
no outgoing calls
no test coverage detected
searching dependent graphs…