const o={isAbsolute:i=>i.startsWith("/")||i.startsWith("\\")||i.startsWith("C:\\"),dirname:i=>n.guessDeliminator(i).dirname(i),basename:i=>n.guessDeliminator(i).basename(i),rest:(i,t)=>n.guessDeliminator(i).rest(i,t),extension:i=>{let t=i.split(".");return t.length===1?"":t.at(-1)??""}};var n=class a{constructor(t){this.deliminator=t}static guessDeliminator(t){return t.includes("/")?new a("/"):new a("\\")}join(...t){return t.filter(Boolean).join(this.deliminator)}basename(t){return t.split(this.deliminator).pop()??""}rest(t,s){let r=t.split(this.deliminator),l=s.split(this.deliminator),e=0;for(;e<r.length&&e<l.length&&r[e]===l[e];++e);return r.slice(e).join(this.deliminator)}dirname(t){let s=t.split(this.deliminator);return s.pop(),s.join(this.deliminator)}};export{o as n,n as t};
