UNPKG

horojs

Version:

A micro library for a reactive UI application.

3 lines (2 loc) 495 B
import{insertionPrefix as e,eventHandlingPrefix as $,attrsPrefix as t}from"../instruction.js";const c=/(<[a-z\=\"\s\-]* )([a-z\-\@]*)="?$/im;function r(r){let l=r[0];for(let n=1;n<r.length;n++){const a=r[n],o=l.match(c);l=null===o?`${l}\x3c!--${e}${n-1}--\x3e${a}`:o[2].startsWith($)?`${l.replace(c,`\x3c!--$2:${n-1}--\x3e$1`)}${a.replace(/^(["])/m,"")}`:`${l.replace(c,`\x3c!--${t}$2:${n-1}--\x3e$1`)}${a.replace(/^(["])/m,"")}`}return l}export{r as joiner}; //# sourceMappingURL=joiner.js.map