IF Commons GitHub

names

Written to: 1 requirement: 1 proved, 0 partly, 0 failing, 0 with no test recorded. 0001-kanon-checker FR-001

The two names a table is made of (commons 0033-kanon FR-010): a folder of a library and a package's name, branded types made only by their smart constructors (parse, don't validate).

Source: commons/kanon/src/names.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.

FolderNametypeno test imports it
type FolderName = Brand<string, "kanon folder">;

A folder of a library from its root, with a trailing / (./ for the files at the root): made only by parseFolder.

PackageNametypeno test imports it
type PackageName = Brand<string, "kanon package name">;

A package's name, as @scope/name or name: made only by parsePackageName.

parseFolderfunction
function parseFolder(text: string): Result<FolderName, string>

A folder from text, or why the text is not one: the one way a FolderName is made.

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

parsePackageNamefunction
function parsePackageName(text: string): Result<PackageName, string>

A package name from text, or why the text is not one: the one way a PackageName is made.

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

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