chadwyck242 / popular-movie-quotes

A simple NPM package which returns popular movie quotes.

Home Page:https://www.npmjs.com/package/popular-movie-quotes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GitHub license NPM MODULE NPM MODULE NPM MODULE NPM MODULE NPM MODULE NPM MODULE

A simple NPM package to get popular movie quotes.

Getting started

NPM

$ npm i popular-movie-quotes --save

Installation

NPM INSTALL NODE JS NODE JS

This is a Node.js module available through the npm registry.

Before installing, download and install Node.js.

Installation is done using the npm install command:

$ npm i popular-movie-quotes --save

Usage

usage

  • getAll() method returns an array of objects, each containing quote and movie.
{
    "quote": "Frankly, my dear, I don't give a damn.",
    "movie": "Gone with the Wind"
}
  • getQuoteByYear(startYear, endYear)_ method rreturns a sorted object within the range of year startYear -endYear**
[
    {
        "quote": "Frankly, my dear, I don't give a damn.",
        "movie": "Gone with the Wind",
        "year": startYear
    }
    ...
    .....
    {
        "quote": "Frankly, my dear, I don't give a damn.",
        "movie": "Gone with the Wind",
        "year": endYear
    }
]
  • getSomeRandom(count) method returns an array (of length 'count') of non-duplicate random objects containing quote and movie.
[
    {
        "quote": "Frankly, my dear, I don't give a damn.",
        "movie": "Gone with the Wind"
    }
    // with 'count' number of quote objects.
]
  • getRandomQuote() method returns a random movie quote : I used to think that my life was a tragedy. But now I realize, it’s a comedy.
const movieQuote = require("popular-movie-quotes");

console.log(movieQuote.getAll()); //get an array with all available quotes.

console.log(movieQuote.getSomeRandom(10)); // get an array of 10 random quotes.

console.log(movieQuote.getRandomQuote()); // get a random quote

Want to contribute?

Open Source Love forthebadge

Please check issues here!

License

GitHub license

Let's get connected

Twitter Follow GitHub followers Facebook Instagram LinkedIn

Special Thanks

Karan Bhatt Facebook Instagram GitHub followers

Rishabh Kanojia Facebook Instagram GitHub followers


forthebadge forthebadge forthebadge forthebadge

About

A simple NPM package which returns popular movie quotes.

https://www.npmjs.com/package/popular-movie-quotes

License:MIT License


Languages

Language:JavaScript 100.0%