Sha256: f4fddefe4da27031d00671358460b35f6bfbb8e5bb16954a545506306e3d6417
Contents?: true
Size: 894 Bytes
Versions: 5
Compression:
Stored size: 894 Bytes
Contents
function erb(variable){ return document.getElementById("vueonrails-" + variable).getAttribute("data-" + variable) } function isView(pageClassString){ if(pageClassString == "###") return if(pageClassString != "") pageClassString = pageClassString.replace(/#/g , " "); return document.getElementsByClassName(pageClassString).length == 1 } function puts(obj){ console.log({obj}) } function p(obj){ console.log({obj}) } function addClass(identifier, className){ document.getElementById(identifier).classList.addClass(className) } function toggleClass(identifier, className){ document.getElementById(identifier).classList.toggle(className) } function table(obj){ console.table(obj) } function titleize(str){ return str.replace(/\b\S/g, function(t) { return t.toUpperCase() }); } function isArray(obj){ return Object.prototype.toString.call(obj) === '[object Array]' ; }
Version data entries
5 entries across 5 versions & 1 rubygems