Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

google-news-json

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

google-news-json - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

41

lib/index.js

@@ -14,10 +14,10 @@ const GEO = "geo";

Topics.prototype.WORLD = "WORLD";
Topics.prototype.NATION = "NATION";
Topics.prototype.BUSINESS = "BUSINESS";
Topics.prototype.TECHNOLOGY = "TECHNOLOGY";
Topics.prototype.ENTERTAINMENT = "ENTERTAINMENT";
Topics.prototype.SCIENCE = "SCIENCE";
Topics.prototype.SCIENCE = "SPORTS";
Topics.prototype.SCIENCE = "HEALTH";
const TOPICS_WORLD = "WORLD";
const TOPICS_NATION = "NATION";
const TOPICS_BUSINESS = "BUSINESS";
const TOPICS_TECHNOLOGY = "TECHNOLOGY";
const TOPICS_ENTERTAINMENT = "ENTERTAINMENT";
const TOPICS_SCIENCE = "SCIENCE";
const TOPICS_SPORTS = "SPORTS";
const TOPICS_HEALTH = "HEALTH";

@@ -121,3 +121,2 @@ const _generateGoogleFeedURL = function(method, query, locale){

// noinspection JSUnresolvedFunction,NodeJsCodingAssistanceForCoreModules
let xml2js = require('xml2js');

@@ -131,2 +130,5 @@ xml2js.parseString(data, function (err, result) {

let rss = _parseArr(result['rss']['channel']);
rss.items = Object.assign({}, rss.item);
delete rss.item;
if(typeof callback === "function") callback(err, rss);

@@ -136,15 +138,14 @@ resolve(rss);

});
// // noinspection JSUnresolvedFunction,NodeJsCodingAssistanceForCoreModules
// let http = require('https');
//
// // noinspection JSUnresolvedFunction
// const feed2json = require('feed2json');
// feed2json.fromStream(http.get(feedUrl), feedUrl, (err, rss) => {
// if(typeof callback === "function") callback(err, rss);
// err ? reject(err) : resolve(rss);
// });
});
};
module.exports = { HIGHLIGHTS, TOP_NEWS, LOCATION, SEARCH, TOPIC, GEO, getNews, Topics };
module.exports = { HIGHLIGHTS, TOP_NEWS, LOCATION, SEARCH, TOPIC, GEO, getNews, Topics,
TOPICS_WORLD,
TOPICS_NATION,
TOPICS_BUSINESS,
TOPICS_TECHNOLOGY,
TOPICS_ENTERTAINMENT,
TOPICS_SCIENCE,
TOPICS_SPORTS,
TOPICS_HEALTH
};
{
"name": "google-news-json",
"version": "2.0.0",
"version": "2.0.1",
"description": "Simple to use google news api",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

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