UNPKG

esr-code-line

Version:

A code line generator for orange payment slips used in Switzerland

13 lines (12 loc) 610 B
export declare function checkDigit(code: string): number; export declare const attachCheckDigit: (code: string) => string; export declare function pad(s: string, n: number): string; export declare function toSubscriberNumber(customerNumber: string): string; export interface SlipRequirements { readonly slipType: "01" | "04" | "11" | "14" | "21" | "23" | "31" | "33"; readonly amountFrancsOrEuros: string; readonly amountRappenOrCents: string; readonly referenceNumber: string; readonly customerNumber: string; } export declare function codeLine(req: SlipRequirements): string;