New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

random-quotes

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

random-quotes

Get random quotes

latest
Source
npmnpm
Version
1.3.0
Version published
Maintainers
1
Created
Source

random-quotes

Get random quotes.

Installation

$ npm install --save random-quotes

Usage

NodeJS:

const randomQuotes = require('random-quotes');

Browsers:

<script src="node_modules/random-quotes/dist/index.umd.min.js"></script>
randomQuotes();
//  {
//    body: 'It\'s not poisonous...',
//    author: 'Famous Last Words'
//  }

API

  • randomQuotes([count=1])

    • count: Number, Optional: The number of random quotes to get.
    • Returns a random quote object with the following keys: author, body
    • When count is given, returns an array of random quotes.
  • randomQuotes.byAuthor(author)

    • author: String. The name of the author.
    • Returns an array of quotes by the given author. Array will contain the string bodies of the quotes directly.

License

MIT License

Keywords

quotes

FAQs

Package last updated on 01 Nov 2017

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