Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return post.draft !== true;
});
if (posts.length <= 0) {
feedConfig.autodiscovery = false;
return;
}
if (feedConfig.limit) posts = posts.limit(feedConfig.limit);
let url = config.url;
if (url[url.length - 1] !== '/') url += '/';
let icon = '';
if (feedConfig.icon) icon = full_url_for.call(this, feedConfig.icon);
else if (config.email) icon = gravatar(config.email);
const xml = template.render({
config,
url,
icon,
posts,
feed_url: config.root + path
});
return {
path,
data: xml
};
};
function getAvatar() {
if (gravatar) {
return gravatrHelper(gravatar, 128);
}
if (avatar) {
return url_for(avatar);
}
return url_for('/img/avatar.png');
}
module.exports = function(email, options) {
return gravatar(email, options);
};