@cloudinary/url-gen
Version:
Cloudinary URL-Gen SDK ========================= [](https://app.travis-ci.com/github/cloudinary/js-url-gen) ## About The Cloudinary URL-Gen SDK allows you to quickly and eas
12 lines (11 loc) • 485 B
JavaScript
import { processCustomFunction } from "./processCustomFunction.js";
/**
* Parse custom_pre_function options
* @private
* @param {object|*} customPreFunction a custom function object containing function_type and source values
* @return {string|*} custom_pre_function transformation string
*/
export function processCustomPreFunction(customPreFunction) {
const result = processCustomFunction(customPreFunction);
return typeof result === 'string' ? `pre:${result}` : null;
}