budgie-cli
Version:
Node CLI for Budgie.
19 lines (14 loc) • 455 B
text/typescript
import { IGlobAllAsync, IGlobOptions } from "../utils/glob";
export { IGlobOptions };
export const getExcludes = async (
excludes: string | ReadonlyArray<string> | undefined,
globber: IGlobAllAsync,
): Promise<ReadonlyArray<string>> => {
if (excludes === undefined) {
return [];
}
if (typeof excludes === "string") {
return getExcludes([excludes], globber);
}
return globber(excludes);
};