cloudinary-core
Version:
Cloudinary Client Side JS library. Cloudinary streamlines your web application’s image manipulation needs. Cloudinary's cloud-based servers automate image uploading, resizing, cropping, optimizing, sprite generation and more.
17 lines (15 loc) • 308 B
JavaScript
/**
* Return the first argument whose value is not null
* @param args
* @returns {*}
*/
let firstNotNull = function firstNotNull(...args) {
while(args && args.length > 0) {
let next = args.shift();
if( next != null){
return next;
}
}
return null;
};
export default firstNotNull;