joinGlobs

import { joinGlobs } from "jsr:@ende/path/windows/join-globs";

function

function joinGlobs(globs: string[], options: Pick<GlobOptions, "globstar"> = [UNSUPPORTED]): string

Like join(), but doesn't collapse "**/.." when globstar is true.

globs: string[]

The globs to join.

options: Pick<GlobOptions, "globstar"> = [UNSUPPORTED]

The options for glob pattern.

Returns

The joined glob pattern.

Example: Usage

import { joinGlobs } from "@ende/path/windows/join-globs";
import { assertEquals } from "@ende/assert";

const joined = joinGlobs(["foo", "**", "bar"], { globstar: true });
assertEquals(joined, "foo\\**\\bar");

Source