UNPKG

equinox-web-components

Version:

Equinox design for the web using StencilJS

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