Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var genericIterator = function (obj) {
var entries = objectEntries(obj);
return function iterator() {
return {
next: function () {
return {
done: entries.length === 0,
value: entries.shift()
};
}
};
};
};
var genericIterator = function (obj) {
var entries = objectEntries(obj);
return function iterator() {
return {
next: function () {
return {
done: entries.length === 0,
value: entries.shift()
};
}
};
};
};
var genericIterator = function (obj) {
var entries = objectEntries(obj);
return function iterator() {
return {
next: function () {
return {
done: entries.length === 0,
value: entries.shift()
};
}
};
};
};
module.exports = function addEntityAttributes(node, entity) {
objectEntries(entity.payload.attributes || {}).forEach(([name, value]) => {
node[name] = value;
});
}
function build(dict, parent) {
return (parent || xml('vCard', {xmlns: NS})).append(
entries(dict).map(([key, val]) => {
return typeof val === 'object' ? build(val, xml(key)) : xml(key, {}, val)
})
)
}