New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

turbo-rss

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

turbo-rss - npm Package Compare versions

Comparing version 1.0.6 to 1.0.7

.codeclimate.yml

38

lib/index.js

@@ -20,18 +20,23 @@ 'use strict';

* @param itemValues
* @param relatedfinity
*/
function addRelated(related, itemValues) {
ifTruePush(related, itemValues, {
'yandex:related': related.map(
function (rel) {
return {
link: [{
_attr: {
'url': rel.link,
'img': rel.image_url
}
}, rel.text]
};
}
)
function addRelated(related, itemValues, relatedfinity) {
let relatedResult = related.map(function (rel) {
return {
link: [{
_attr: {
'url': rel.link,
'img': rel.image_url
}
}, rel.text]
};
});
if (relatedfinity) {
relatedResult.push({
_attr: {'type': 'infinity'}
});
}
ifTruePush(related, itemValues, {'yandex:related': relatedResult});
}

@@ -70,3 +75,3 @@

if (typeof item.related !== 'undefined') {
addRelated(item.related, item_values);
addRelated(item.related, item_values, item.relatedfinity);
}

@@ -133,3 +138,4 @@

menu: data.menu,
related: data.related
related: data.related,
relatedfinity: data.relatedfinity || false,
};

@@ -136,0 +142,0 @@

{
"name": "turbo-rss",
"version": "1.0.6",
"version": "1.0.7",
"description": "RSS based, feed generator for Yandex turbo",

@@ -14,4 +14,3 @@ "keywords": [

"test": "tape test --tap | tap-difflet",
"lint": "grunt lint",
"test:browser": "prova -b"
"coverage": "istanbul cover tape test -- -R spec"
},

@@ -18,0 +17,0 @@ "homepage": "https://github.com/LightAir/turbo-rss",

@@ -6,7 +6,7 @@ ## WIP

[![Maintainability](https://api.codeclimate.com/v1/badges/6525d2aabf20185b68b6/maintainability)](https://codeclimate.com/github/LightAir/turbo-rss/maintainability)
[![Test Coverage](https://api.codeclimate.com/v1/badges/6525d2aabf20185b68b6/test_coverage)](https://codeclimate.com/github/LightAir/turbo-rss/test_coverage)
[![Build Status](https://travis-ci.org/LightAir/turbo-rss.svg)](https://travis-ci.org/LightAir/turbo-rss)
[![npm](https://img.shields.io/badge/npm%20package-1.0.5-blue.svg?longCache=true&style=flat)](https://www.npmjs.com/package/turbo-rss)
[![npm](https://img.shields.io/badge/npm%20package-1.0.7-blue.svg?longCache=true&style=flat)](https://www.npmjs.com/package/turbo-rss)
![license](https://img.shields.io/packagist/l/doctrine/orm.svg?longCache=true&style=flat)
>Генератор RSS разметки для сервиса Турбо-страницы

@@ -49,6 +49,14 @@

* `content` **string** Содержимое страницы
* `related` _optional_ **object** Аффилированные ссылки `yandex:related` в конце статьи.
* `related` _optional_ **array** Аффилированные ссылки `yandex:related` в конце статьи.
* `relatedfinity` _optional_ **bool** Непрерывная лента статей
*Будет добавлено в новых версиях turbo:source, turbo:topic, menu, pubDate как алиас date*
###### related array
related должен содержать массив объектов со следующими опциями:
* `link` **string** ссылка на статью'
* `image_url` **string** ссылка на изображение к статье
* `text` **string** текст ссылки
##### Получение XML

@@ -55,0 +63,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc