Git Product home page Git Product logo

popular-movie-quotes's Introduction

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

popular-movie-quotes's People

Contributors

nikhilnamal17 avatar itachihyuga avatar afhare avatar arthur-justino avatar shubhankarb180 avatar shivashmahespalsingh avatar sbvkrishna avatar kri88 avatar k1dnyy avatar henryleduc avatar hahahandroid avatar thraxhamilton avatar stevenpersia avatar gmananan avatar harshwp avatar davidlfox avatar cocoliliace avatar ambikasadhu1101 avatar alaabouayed avatar codelixir avatar codebreaker-00 avatar chadwyck242 avatar cemuka avatar utkarshdhiman48 avatar u3x avatar sumedhj16 avatar souravaswal avatar babadzhanov avatar 0sf avatar sakshisrivastava413 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.