"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.compareStringsAsWordSets = compareStringsAsWordSets;
function compareStringsAsWordSets(string1, string2) {
    if (string1 === undefined || string2 === undefined) {
        return false;
    }
    const words1 = new Set(string1.split(' '));
    const words2 = new Set(string2.split(' '));
    return (words1.size === words2.size &&
        [...words1].every((value) => words2.has(value)));
}
