Minified version! #2
naryal2580
started this conversation in
Show and tell
Replies: 1 comment
-
const $=(q,r)=>{const e=document.querySelectorAll(q);if(e.length===1||!r){return e[0]};return Array.prototype.slice.call(e)};const __=(o)=>{if(typeof(o)==="object"&&'length'in o){return 1}};const _=(p,t,a,i)=>{var p=$(p);let e=document.createElement(t);if(!(__(typeof(a)))){for(k in a){e.setAttribute(k,a[k])}};if(i){e.innerText=i.toString()};p.appendChild(e)};const $$=(c)=>{window.addEventListener("DOMContentLoaded",()=>{c()})};const $_=async(m,u,d)=>{var h={};if(d){h['Content-Type']='application/json'};const r=await fetch(u,{method:m,mode:'same-origin',cache:'no-cache',credentials:'same-origin',headers:h,redirect:'follow',referrerPolicy:'no-referrer',body:JSON.stringify(d)});return await r.json()}; New update reduces 10B making it |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Above is the minified version of: (https://github.com/naryal2580/YoktoJS/blob/df49d68efd727aeb240fb06e2057a2c2cc98a650/yokto.js)
Above minified code is of
717B
! Let's see, if anyone can minify it even more!Beta Was this translation helpful? Give feedback.
All reactions