@limetech/lime-elements
Version:
2 lines • 615 B
JavaScript
import{g as n,a as t,b as e,c as r}from"./p-89524e09.js";function o(o){const i={id:crypto.randomUUID(),filename:o.name,contentType:o.type,size:o.size,fileContent:o};i.icon={name:n(i),title:t(i),color:e(i),backgroundColor:r(i)};return i}function i(n,t){if(t===undefined||t==="*"){return true}const e=t.split(",").map((n=>n.trim()));return e.some((t=>{if(t===n.contentType){return true}if(t.endsWith("/*")){const e=t.split("/")[0];return n.contentType.startsWith(`${e}/`)}if(t.startsWith(".")){const e=t.split(".")[1];return n.contentType.endsWith(`/${e}`)}}))}export{o as c,i};
//# sourceMappingURL=p-b8c91b22.js.map