"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
function applyDataset(element, data = {}) {
    const dataset = element.dataset;
    for (let prop in dataset) {
        if (data[prop] === undefined) {
            delete dataset[prop];
        }
    }
    for (let prop in data) {
        const value = data[prop];
        element.dataset[prop] = value;
    }
}
exports.default = applyDataset;
//# sourceMappingURL=applyDataset.js.map