Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
Object.keys(props).forEach(key => {
const camelKey = Util.camelCase(key);
const value = props[key];
//if valid and defined add to cloudinaryProps
if (CLOUDINARY_PROPS[camelKey]) {
if (isDefined(props, key)) {
result.cloudinaryProps[camelKey] = value;
}
} else if (CLOUDINARY_REACT_PROPS[camelKey]) { //cloudinary-react spesific prop
result.cloudinaryReactProps[camelKey] = value;
} else { //not valid so add to nonCloudinaryProps
result.nonCloudinaryProps[key] = value;
}
});