highest-averages
Version:
Zero-dependency and extensible set of highest averages methods for allocating seats in a parliament. ### Install ```shell npm i highest-averages ``` ### Pure Example - Define the candidates with their vote ```typescript const a = new Candidate('A', 200) c
10 lines (9 loc) • 322 B
TypeScript
import { Candidate } from '../models/candidate';
import { CandidateResult } from '../models/candidate_result';
export declare class Greenland2018 {
private readonly dhondt;
private readonly seat;
apply(candidates: Candidate[]): CandidateResult[];
}
export declare class Greenland2021 extends Greenland2018 {
}