GithubHelp home page GithubHelp logo

starwars's Introduction

starwars

starwars is a simple Node.js module that allows you to insert a random Star Wars quote into your site, or view one through the command line.

Usage

Simply install through npm by running...

npm install starwars

...and require the module from your Node.js application. You're good to go! Either insert a single (random) quote, or retrieve a list containing all of the available quotes.

var starwars = require('starwars');

console.log(starwars()); // "No. I am your Father."
console.log(starwars()); // "Great shot kid, that was one in a million."
console.log(starwars.quotes); // ["No. I am your Father.", "Great shot kid, that was one in a million.",...]

Command Line

starwars can also be used within the command line. Simply install globally through npm by running...

npm install starwars -g

...and then typing starwars into your console. A random quote will then be displayed on the screen (especially helpful if you're having a bad day and need to read some inspirational text).

You can also type starwars -all into your console to display all of the available quotes.

starwars's People

Contributors

dcgauld avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

starwars's Issues

No link to this repo on npmjs.org

Hi!

I was about to use this library for the fun of it and found it on npmjs.org, but there's no link to this repo in the package which made me feel a bit unsafe since I couldn't verify the source code so there wasn't anything malicious in it.

Think it would be a great idea to add this repo-link to your npmjs.org package: https://www.npmjs.com/package/starwars :)

Great job!

PR to add characters and possibly movie source?

Hello @dcgauld
Would you accept a non breaking PR to add the character's name for each quotes?

Maybe add the source movie too...

Existing functions would still work as is.
Would probably add something like starwars.withCharacter() (likewise for the CLI)

tx

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.