Giter VIP home page Giter VIP logo

nyan-js's Introduction

Nyan

Pure js library for rendering nyan frames

Usage

var opts = {
  colors: true, // use colors instead of just raw ascii
  pure: true, // use solid colors only
  stream: { write: data => console.log(data) } // an object with a write function to do something with the frames.
};

require('nyan-js')(opts);

You can also "pipe" it to a stream (pipe is pretend, nyan isn't a real stream). The frames will be written to the given stream:

var nyan = require('nyan-js');

// it returns an interval rather than the stream you pass it
var interval = nyan.pipe(process.stdout);
clearInterval(interval);

Try running the examples in ./examples:

node examples/basic.js --colors
node examples/basic.js --colors --pure

Credits

Nyan Cat ASCII frames lifted from https://github.com/vtsvang/nyancat-telnet-node

nyan-js's People

Contributors

kanatzidis avatar

Stargazers

 avatar

Watchers

 avatar  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.