KatsuteDev / Background

The most advanced background image extension for VSCode
https://marketplace.visualstudio.com/items?itemName=katsute.code-background
GNU General Public License v2.0
70 stars 4 forks source link

Optimize glob filtering #337

Closed Katsute closed 1 month ago

Katsute commented 1 month ago

Replace https://github.com/KatsuteDev/Background/blob/d0acae680ca0e9e928574e98c7c89f81a3dc9e01/src/lib/glob.ts#L28-L34

with

const filter: (v: string) => boolean = (v : string) => {
    const ext: string = extname(v).slice(1); // remove the dot at the beginning
    return extensions().includes(ext);
}