IF Commons GitHub

logical/spans

Written to: 1 requirement: 1 proved, 0 partly, 0 failing, 0 with no test recorded. 0005-evidence-capture-views FR-001

Spans of time as a person writes them (30m, 7d, or ISO 8601) and as they are shown. Pure.

import { durationText } from "./spans.ts";
durationText(3_600_000); // "1h"

Source: commons/evidence-capture/src/logical/spans.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.parseSpanfunctionno test imports it
function parseSpan(text: string): Result<number, string>

A duration as 1h, 30m, 7d or ISO 8601 (PT1H), in milliseconds.

logical.durationTextfunctionno test imports it
function durationText(ms: number): string

A span of milliseconds as short text.

parseSpanfunction
function parseSpan(text: string): Result<number, string>

A duration as 1h, 30m, 7d or ISO 8601 (PT1H), in milliseconds.

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

durationTextfunction
function durationText(ms: number): string

A span of milliseconds as short text.

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

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