Sindbad~EG File Manager

Current Path : /home/infinitibizsol/.trash/node_modules.5/cloudinary-core/src/util/
Upload File :
Current File : /home/infinitibizsol/.trash/node_modules.5/cloudinary-core/src/util/firstNotNull.js

/**
 * 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;

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists