Skip to content

camilleramseur/popular-movie-quotes

 
 

Repository files navigation

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

Testing

  • Check if quote is duplicate/already present.
$ npm test

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.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%