Socket
Socket
Sign inDemoInstall

iquotes

Package Overview
Dependencies
0
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    iquotes

Get inspirational quotes


Version published
Weekly downloads
5
decreased by-28.57%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

iquotes

Get inspirational quotes

Build Status NPM version XO code style

Introduction

API of inspirational >280 quotes (Carefully collected) with 3 category:

  • Life (~160 quotes)
  • Love (~100 quotes)
  • Development (~20 quotes)

Install

$ npm install iquotes

Usage

const iquotes = require('iquotes');

iquotes.random();
// {
//   "quote": "The master has failed more times than the beginner has even tried.",
//   "author": "Stephen McCranie",
//   "category": "Life"
// }

// View API for more usage

API

.all(category: string = 'all'): object[]

Get list of all quotes by categories

iquotes.all('life');
// or
iquotes.all(); // To get all quotes

// [
//   {
//     "quote": "The master has failed more times than the beginner has even tried.",
//     "author": "Stephen McCranie",
//     "category": "Life"
//   },
//   {...},
//   ...
// ]

.random(category: string = 'all'): object

Get random quotes from all quotes or by cagegories

iquotes.random(); 
// or
iquotes.random('life'); // To get random life quotes

// {
//   "quote": "The master has failed more times than the beginner has even tried.",
//   "author": "Stephen McCranie",
//   "category": "Life"
// }

.count(category: string = 'all'): number

Get number of all quotes or number of quotes by categories

iquotes.count();
// 280
iquotes.count('love');
// 100

.countDetail(): object[]

Get detail number of all categories

iquotes.countDetail();

// [
//   { type: 'life', count: 162 },
//   { type: 'love', count: 100 },
//   { type: 'dev', count: 18 },
//   { type: 'all', count: 280 } 
// ]

.categories(): string[]

Get supported categories list

iquotes.categories();

// ['life', 'love', 'dev', 'all'];

Supported Categories

  • life
  • love
  • dev (Development)
  • all - Default (If not provide any categories or provide all)

License

MIT © Kyoz

Keywords

FAQs

Last updated on 05 Jun 2019

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc