linted
Version:
ESLint mono-plugin bundler with strict, opinionated defaults for JavaScript, TypeScript, Svelte, HTML, Tailwind/CSS, JSON, JSONC, YAML, and Mocha.
28 lines • 744 B
JavaScript
export function directory(path, subpath) {
return subpath === undefined
? path
: path + (path.endsWith("/")
? subpath.startsWith("/")
? subpath.slice(1)
: subpath
: subpath.startsWith("/")
? subpath
: "/" + subpath);
}
export function not(path, subpath) {
return "!" + directory(path, subpath);
}
export function flat(path, subpath) {
return directory(directory(path, subpath), "*");
}
export function recurse(path, subpath) {
return flat(path, subpath) + "*";
}
export function file(extension, name = "*") {
return "**"
+ "/"
+ name
+ "."
+ extension;
}
//# sourceMappingURL=index.js.map