import { join as arrayJoin } from './array-utils.js';
export function addAll(set, elements) {
    if (!set) {
        throw new Error('A Set must be passed so as to insert elements.');
    }
    if (!elements || elements.length === 0) {
        return set;
    }
    elements.forEach(element => set.add(element));
    return set;
}
export function join(set, separator = ',', quoted = false) {
    if (!set) {
        throw new Error('A Set must be passed so as to join elements.');
    }
    return arrayJoin(Array.from(set), separator, quoted);
}
