@cloudinary/url-gen
Version:
You are invited to influence our new SDK [Click here to view github discussion](https://github.com/cloudinary/js-url-gen/discussions/602) =========================
11 lines (10 loc) • 319 B
JavaScript
import { legacyNormalizeExpression } from "../utils/legacyNormalizeExpression.js";
/**
* Parse "if" parameter
* Translates the condition if provided.
* @private
* @return {string} "if_" + ifValue
*/
export function process_if(ifValue) {
return ifValue ? "if_" + legacyNormalizeExpression(ifValue) : ifValue;
}