export function last(values) {
    return values[values.length - 1];
}
export function uniqueBy(values, key) {
    const seen = new Set();
    const output = [];
    for (const value of values) {
        const id = key(value);
        if (seen.has(id))
            continue;
        seen.add(id);
        output.push(value);
    }
    return output;
}
