is_empty(), _size(), _() are useful javascript code snifets frequently used for development

function is_empty(value){ if( value == "" || value == null || value == undefined || ( value != null && typeof value == "object" && !Object.keys(value).length ) ){ return true }else{ return false } }
function _size(obj){ return Object.keys(value).length; }
function _(id){ return document.getElementById(id); }


  • No labels