Skip to main content

Module fibre

Module fibre 

Source
Expand description

Fibre composition validation — EU textile DPP regulation.

Structs§

FibreInput
A fibre entry for composition validation.

Constants§

FIBRE_SUM_TOLERANCE
Tolerance (percentage points) allowed when fibre percentages are summed.

Functions§

fibre_sum_ok
Whether fibre percentages sum to ~100% (± FIBRE_SUM_TOLERANCE).
validate_fibre_composition
Validate a textile fibre composition: non-empty, each pct in [0, 100], any country_of_origin a valid ISO 3166-1 alpha-2 code, and the percentages summing to ~100% (± FIBRE_SUM_TOLERANCE).