From f91437650ba6b2c5a902e944e09136cb5c529805 Mon Sep 17 00:00:00 2001 From: Denis Zhbankov Date: Mon, 9 Jul 2018 13:27:37 +0300 Subject: [PATCH] item-attr: item attr --- lib/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/index.js b/lib/index.js index 2ad40a43..0b1a9f4b 100755 --- a/lib/index.js +++ b/lib/index.js @@ -64,6 +64,7 @@ function generateXML (data){ var item_values = [ { title: { _cdata: item.title } } ]; + ifTruePush(item._attr, item_values, { _attr: item._attr }); ifTruePush(item.description, item_values, { description: { _cdata: item.description } }); ifTruePush(item.url, item_values, { link: item.url }); ifTruePush(item.link || item.guid || item.title, item_values, { guid: [ { _attr: { isPermaLink: !item.guid && !!item.url } }, item.guid || item.url || item.title ] }); @@ -163,6 +164,7 @@ function RSS (options, items) { this.item = function (options) { options = options || {}; var item = { + _attr: options._attr, title: options.title || 'No title', description: options.description || '', url: options.url,