Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including octodex with all npm packages installed. Try it out:

var octodex = require("octodex")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

octodex v1.0.0

Get random octodex img URLs.

octodex Build Status

Get random octodex img URLs.

Getting Started

Install the module with: npm install octodex

var cat = require('octodex');

cat.img(function(err,url){
    if(!err){
        console.log(url);
       // This will give a random img url.
    }
});

You can also pass the second parameter indicating to the module to do in memory cache of the parsed content. Using it, he will perform the parce only once. making the other invocations faster.

var cat = require('octodex');

cat.img(function(err,url){
    if(!err){
        console.log(url);
       // This will give a random img url.
    }
}, true);

License

Copyright (c) 2013 Hemanth.HM
Licensed under the MIT license.

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free