GithubHelp home page GithubHelp logo

harvey-specter-quotes's Introduction

Harvey Specter quotes

A JavaScript micro-library to get quotes of Harvey Specter, from the series Suits.

Travis npm Codecov npm license PRs Welcome

console.log('Harvey says...');
harveyQuotes.random(); // "I don’t play the odds, I play the man."
harveyQuotes.random(); // "Don't go to trial."
harveyQuotes.random(); // "Life is like this__ . I like this ^-."
...

Who doesn't love a good Harvey Specter reply?

harvey-specter-quotes is a micro-library that can be used to generate quotes from Suits Series, spoken by Harvey. This package is an attempt to document the wisdom that is given to all, by the makers of Suits.

Harvey Specter, is a cocky lawyer at a top New York Law Firm. Known as the 'best closer' in the city, he is one hell of a lawyer. He has built his career and life around one thing: winning. The Internet features his quotes in discussions, blogposts, posters, and even in memes. Inspired by those, this library aims to record his quotes from the Show.

harvey-gif

Table of Contents

Requirements

The following are pre-requisites to run :

Installation

Inside your project, run:

$ npm install harvey-specter-quotes

Browser Support

<script src='https://unpkg.com/[email protected]/dist/index.umd.js'></script>
                                  <!--  or  -->
<script src='https://unpkg.com/[email protected]/dist/index.umd.min.js'></script>

Usage

As Node Module

You can load the node module dependency into your code with a require call:

var harveyQuotes = require('harvey-specter-quotes');

Example

var harveyQuotes = require('harvey-specter-quotes');

var allQuotes = harveyQuotes.all;
var randomQuote = harveyQuotes.random();
var anotherRandomQuote = harveyQuotes.random();

console.log('Harvey replied,', randomQuote);

For Browsers

<script>
  var quote1 = harveySpecterQuotes.random();
</script>

API

The harvey-specter-quotes object has the following methods and attributes:

all

Returns all available quotes as an array.

random([count])

Function that returns a random quote from the collection of quote, that is never same as the previous call.

var randomQuote = harveyQuotes.random();
var anotherRandomQuote = harveyQuotes.random();

// randomQuote !== anotherRandomQuote
// At all times

count - type:number (optional)

When passed in an optional number as argument, API returns an array of quotes from the collection matching length of the argument specified.

var moreQuotes = harveyQuotes.random(4);
console.log(moreQuotes);
>> [ 'The better you dress, the worse you can behave.',
     'Life is a game. Play to win.',
     'Work until you no longer have to inroduce yourself',
     'Win a no win situation by rewriting the rules.' ]

Missing Something?

Do have some more cool ideas for this project? Maybe you found some bugs? or few typos? Can't scratch off the itch to make this even more awesome?

Guess what, I have been looking for you! 🎉 Open an issue or submit a pull!

How Can I Help ?

  • Add Documentation - in form of comments & docs(for example, a CONTRIBUTING.md)
  • Come up with features to improve the project
  • Find Broken things and open issues
  • Enlighten me with better coding patterns and structures

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Credits

Thanks to @kentcdodds to have helped me get started with my first-ever Open Source library. Checkout his blogpost and course here.

License

This project is licensed under the MIT License.
Arjith Natarajan © 2018

harvey-specter-quotes's People

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.