utilities

for education

by aniketmhatre88

Babel + JSX

let _ = {
	noop() {},

	now() {
      return new Date().getTime();
	},
  
  result(object, property, defaultValue) {
     let val = object[property];
     
     if (typeof(val) === 'function') {
       val = val.call(object);
     }
     
     return val || defaultValue;
   }
}