Socket
Socket
Sign inDemoInstall

hook.io-feedsub

Package Overview
Dependencies
8
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.2 to 0.2.0

.travis.yml

18

lib/feed.js

@@ -10,15 +10,15 @@ var Hook = require('hook.io').Hook,

Hook.call(this, options);
this._readers = [];
this.on('hook::ready', function () {
for (var key in self.feeds) {
(function(feed) {
var reader = new FeedSub(feed.url, feed);
self.feeds.forEach(function(feed) {
var reader = new FeedSub(feed.url, feed);
reader.on('item', function(item) {
self.emit(feed.name + '::item', item);
});
reader.on('item', function(item) {
self.emit(feed.name + '::item', item);
});
reader.start();
})(self.feeds[key]);
}
reader.start();
self._readers.push(reader);
});

@@ -25,0 +25,0 @@ });

@@ -5,3 +5,3 @@ {

"keywords": ["hook.io", "feed", "rss", "atom", "subscribe"],
"version": "0.1.2",
"version": "0.2.0",
"repository": {

@@ -17,3 +17,3 @@ "type": "git",

"bin": {
"hookio-feed": "./bin/feed"
"hookio-feedsub": "./bin/feedsub"
},

@@ -24,3 +24,3 @@ "engines": {

"dependencies": {
"hook.io": "0.7.x",
"hook.io": ">=0.8.0",
"feedsub": ">=0.0.5"

@@ -27,0 +27,0 @@ },

@@ -0,1 +1,3 @@

# hook.io-feedsub [![Build Status](https://secure.travis-ci.org/fent/hook.io-feedsub.png)](http://travis-ci.org/fent/hook.io-feedsub)
Will "subscribe" to a web RSS/Atom feed and emit any new items it reads from it. The events are in the form of

@@ -33,4 +35,3 @@

Usage
------------------
# Usage

@@ -42,4 +43,3 @@ ```bash

Install
------------
# Install

@@ -51,4 +51,4 @@ ```bash

Tests
---------
# Tests
The single test is written with [vows](http://vowsjs.org/)

@@ -59,1 +59,5 @@

```
# Licence
MIT

@@ -23,3 +23,2 @@ var assert = require('assert')

name: 'feedsub',
emitOnStart: true,
"feeds": [

@@ -29,2 +28,3 @@ {

"url": "http://rss.cnn.com/rss/cnn_latest.rss",
"emitOnStart": true
}

@@ -31,0 +31,0 @@ ]

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc