@swrve/smarttv-sdk
Version:
Swrve marketing engagement platform SDK for SmartTV OTT devices
19 lines (18 loc) • 673 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.combineDictionaries = void 0;
function combineDictionaries(rootDictionary, overiddingDictionary) {
let combinedDictionary = {};
if (rootDictionary && Object.keys(rootDictionary).length > 0) {
const overiddingKeys = Object.keys(overiddingDictionary);
combinedDictionary = rootDictionary;
for (const key of overiddingKeys) {
combinedDictionary[key] = overiddingDictionary[key];
}
}
else {
combinedDictionary = overiddingDictionary;
}
return combinedDictionary;
}
exports.combineDictionaries = combineDictionaries;