@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) =========================
19 lines (15 loc) • 441 B
JavaScript
;
Object.defineProperty(exports, '__esModule', { value: true });
/**
*
* @description - Replace (,) and (/) in a string to its URL encoded equivalence
* @param {string} str
* @private
*/
function serializeCloudinaryCharacters(str) {
if (str === void 0) { str = ''; }
return str
.replace(/,/g, '%2C')
.replace(/\//g, '%2F');
}
exports.serializeCloudinaryCharacters = serializeCloudinaryCharacters;