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