UNPKG

equinox-web-components

Version:

Equinox design for the web using StencilJS

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