IF Commons GitHub

logical/glob

Written to: 1 requirement: 1 proved, 0 partly, 0 failing, 0 with no test recorded. 0003-repoctl-sync FR-001

Globs of paths, as the tables of the generators write them (commons repoctl 0003-repoctl-sync FR-001): * is the characters of one segment and ** any number of segments. A path matches a glob, and two globs overlap where some path could match both, which is what makes one generator come after another: it reads what the other writes.

import { matches, overlap } from "./glob.ts";
matches("commons/*\/LICENSE", "commons/core/LICENSE"); // true
overlap("commons/**\/suite/**", "commons/core/suite/a.test.ts"); // true

Source: commons/repoctl/src/logical/glob.ts

2 of 4 exports are imported by a test of the run. A test that imports an export may not call it or check what it returns.

logical.matchesfunctionno test imports it
function matches(glob: string, path: string): boolean

Whether a path (from the repository's root, with /) matches a glob.

logical.overlapfunctionno test imports it
function overlap(a: string, b: string): boolean

Whether some path could match both globs.

matchesfunction
function matches(glob: string, path: string): boolean

Whether a path (from the repository's root, with /) matches a glob.

Imported by 6 tests of the run (6 passed, 0 failed): the library's results

overlapfunction
function overlap(a: string, b: string): boolean

Whether some path could match both globs.

Imported by 6 tests of the run (6 passed, 0 failed): the library's results

Titles, headings, exports, tables, columns and requirements. Esc closes.