UNPKG

equinox-web-components

Version:

Equinox design for the web using StencilJS

1 lines 449 B
const t=t=>t?t.split(" ").length>=2?t.match(/\b(\w)/g).join(""):t.substr(0,2):"",r=(t,r="unknown")=>{try{return t=t.split(""").join('"'),JSON.parse(t)}catch(o){console.log(t,o),alert(`Error while trying to parse JSON in ${r} component`)}},o=(t,r,e,n="")=>{let c;if(t&&"object"==typeof t){if(t[r]===e)return`${n}'${r}'`;for(const a of Object.keys(t))if(c=a===r&&t[a]===e?n:o(t[a],r,e,`${n}'${a}'`),c)break;return c}};export{r as d,o as f,t as g}