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.2 to 1.0.3

16

lib/index.js

@@ -28,3 +28,2 @@ 'use strict';

item_values.push({'turbo:source': item.url});
// item_values.push({'turbo:topic': item.title});

@@ -73,6 +72,2 @@ ifTruePush(item.date, item_values, {pubDate: new Date(item.date).toGMTString()});

this.link = options.link;
this.image_url = options.image_url;
this.author = options.author;
this.content = options.content;
this.pubDate = options.pubDate;
this.items = items || [];

@@ -82,3 +77,3 @@

options = options || {};
var item = {
let item = {
title: options.title || 'No title',

@@ -89,4 +84,5 @@ description: options.description || '',

author: options.author,
date: options.date,
content: options.content
date: options.date || options.pubDate,
content: options.content,
menu: options.menu
};

@@ -98,4 +94,4 @@

this.xml = function (indent) {
return xml(generateXML(this), indent);
this.xml = function () {
return xml(generateXML(this));
};

@@ -102,0 +98,0 @@ }

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

@@ -37,6 +37,6 @@ "keywords": [

"type": "git",
"url": "http://github.com/lightair/yandex-turbo.git"
"url": "https://github.com/LightAir/turbo-rss.git"
},
"bugs": {
"url": "http://github.com/lightair/yandex-turbo/issues"
"url": "https://github.com/LightAir/turbo-rss/issues"
},

@@ -43,0 +43,0 @@ "testling": {

@@ -10,9 +10,9 @@ ## WIP

>RSS based, feed generator for Yandex turbo.
>Генератор RSS разметки для сервиса Турбо-страницы
>WARNING! Work In Progress
>ПРЕДУПРЕЖДЕНИЕ! Работа в процессе
### Usage
### Использование
#### Create a new feed
#### Создание канала

@@ -22,18 +22,16 @@ ```js

var feed = new TS(feedOptions);
var feed = new TR(feedOptions);
```
##### `feedOptions`
##### `Опции канала`
* `title` **string** Title of your site or feed
* `description` _optional_ **string** A short description of the feed.
* `author` _optional_ **string** If included it is the name of the item's creator.
* `link` **url string** Url to the site that the feed is for.
* `pubDate` _optional_ **Date object or date string** The publication date for content in the feed
* `title` **string** Название RSS-канала.
* `description` _optional_ **string** Описание канала одним предложением. Не используйте HTML-разметку..
* `author` _optional_ **string** If included it is the name of the item's creator. **(Будет удалено)**
* `link` **url string** Домен сайта, данные которого транслируются..
* `pubDate` _optional_ **Date object or date string** The publication date for content in the feed **(Будет удалено)**
#### Add items to a feed
An item can be used for a blog entry, project update, log entry, etc. Your RSS feed
can have any number of items. Most feeds use 20 or fewer items.
*Будет добавлено в новых версиях turbo:analytics, turbo:adNetwork*
#### Добавление страницы в канал
```js

@@ -45,13 +43,12 @@ feed.item(itemOptions);

* `title` **string** Title of this particular item.
* `image_url` **url string** Link to header image
* `url` **url string** Url to the item. This could be a blog entry.
* `author` _optional_ **string** If included it is the name of the item's creator.
If not provided the item author will be the same as the feed author. This is typical
except on multi-author blogs.
* `date` **string** The date and time of when the item was created. Feed
readers use this to determine the sort order. Some readers will also use it to determine
* `content` **string** Content
* `title` **string** Заголовок страницы.
* `image_url` **url string** Адрес изображения, которое используется в качестве обложки. Изображение может быть в любом формате.
* `url` **url string** URL страницы сайта, для которой нужно сформировать Турбо-страницу.
* `author` _optional_ **string** Автор статьи, размещенной на странице.
* `date` **string** Время публикации контента на сайте источника.
* `content` **string** Содержимое страницы
##### Feed XML
*Будет добавлено в новых версиях turbo:source, turbo:topic, yandex:related, menu, pubDate как алиас date*
##### Получение XML

@@ -61,22 +58,14 @@ ```js

```
Вернёт XML как строку.
This returns the XML as a string.
## Пример использования
>maybe later...
>`indent` _optional_ **boolean or string** What to use as a tab. Defaults to no tabs (compressed).
>For example you can use `'\t'` for tab character, or `' '` for two-space tabs. If you set it to
>`true` it will use four spaces.
## Example Usage
```js
var RSS = require('rss');
var TR = require('turbo-rss');
/* lets create feed */
var feed = new RSS({
var feed = new TR({
title: 'title',
description: 'description',
link: 'http://example.com', // site url
author: 'LightAir',
pubDate: 'May 20, 2012 04:00:00 GMT'
link: 'http://example.com',
});

@@ -88,4 +77,4 @@

image_url: 'http://example.com/example.png',
url: 'http://example.com/article4?this&that', // link to the item
author: 'LightAir', // optional - defaults to feed author property
url: 'http://example.com/article4?this&that',
author: 'LightAir',
date: 'May 27, 2012',

@@ -99,14 +88,8 @@ content: '<p>hello</p>'

### Contributing
## Тестирование
Contributions to the project are welcome. Feel free to fork and improve.
I do my best accept pull requests in a timely manor, especially when tests and updated docs
are included.
Для запуска тестов выполните `npm test`. На текущий момен покрытие тестами не 100%
## Tests
Tests included use Mocha. Use `npm test` to run the tests.
```sh
$ npm test
```
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