Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pbnj/random-quote
A NodeJS library for generating random quotes
https://github.com/pbnj/random-quote
freecodecamp freecodecamp-challenge freecodecamp-project random-quote-machine random-quotes
Last synced: 3 days ago
JSON representation
A NodeJS library for generating random quotes
- Host: GitHub
- URL: https://github.com/pbnj/random-quote
- Owner: pbnj
- License: mit
- Archived: true
- Created: 2017-02-24T04:36:07.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-12-23T19:57:35.000Z (almost 7 years ago)
- Last Synced: 2024-10-31T17:57:18.969Z (13 days ago)
- Topics: freecodecamp, freecodecamp-challenge, freecodecamp-project, random-quote-machine, random-quotes
- Language: JavaScript
- Size: 6.84 KB
- Stars: 5
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# random-quote
> A NodeJS library for generating random quotes[![NPM](https://nodei.co/npm/random-quote.png?downloads=true)](https://nodei.co/npm/random-quote/)
[![Build Status](https://travis-ci.org/petermbenjamin/random-quote.svg?branch=master)](https://travis-ci.org/petermbenjamin/random-quote)
[![NSP Status](https://nodesecurity.io/orgs/petermbenjamin/projects/1105d7b7-5d1f-4006-9811-ad01f130110c/badge)](https://nodesecurity.io/orgs/petermbenjamin/projects/1105d7b7-5d1f-4006-9811-ad01f130110c)## Install
```
npm i -S random-quote
```## Usage
```js
const randomQuote = require('random-quote');randomQuote()
.then(quote => console.log(quote))
.catch(err => console.error(err));// [{"ID":2024,"title":"John C Jay","content":"
If all else fails, [working harder than anyone else] is the greatest competitive advantage of any career.
\n","link":"https://quotesondesign.com/john-c-jay/"}]
```