* Parse custom_function options * @private * @param {object|*} customFunction a custom function object containing function_type and source values * @return {string|*} custom_function transformation string
(customFunction)
| 168 | * @return {string|*} custom_function transformation string |
| 169 | */ |
| 170 | function process_custom_function(customFunction) { |
| 171 | if (!isObject(customFunction)) { |
| 172 | return customFunction; |
| 173 | } |
| 174 | if (customFunction.function_type === "remote") { |
| 175 | const encodedSource = base64EncodeURL(customFunction.source); |
| 176 | |
| 177 | return [customFunction.function_type, encodedSource].join(":"); |
| 178 | } |
| 179 | return [customFunction.function_type, customFunction.source].join(":"); |
| 180 | } |
| 181 | |
| 182 | /** |
| 183 | * Parse custom_pre_function options |
no test coverage detected