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

news-search-lib

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

news-search-lib

Adds methods to news search api

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

News Search Library

Installation

Start by running this command in your project's directory

npm install news-search-lib --save

And then requring it on the top of your index.js file

require('news-search-lib')

Methods

Top Five Stories

Returns the top five stories of the day

Coding samples:

const topFive = topFiveStories()
console.log(topFive) // will log an array of story objects

Top Five Headlines

Returns the top five headlines of the day. If you're in a rush and you need the quick scoop on the day this will do it for you.

Coding samples:

const topFive = topFiveHeadlines()
console.log(topFive) // will log an array of story headlines (strings)

Get random story

Returns a random story from the top 10. Good for when you're feeling spontaneous.

Coding samples:

const story = getRandomStory()
console.log(story) // will log a single story object

Keywords

FAQs

Package last updated on 17 Aug 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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