Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A module for returning the HTML readme for an npm module, to be run in node.js.

branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

README.md

Readme-Getter

This module will return the HTML of an npm README, and return it via callback. To use, just initialize with a reference to either the request module or browser-request if you're working in the browser. From there, call .getReadme() with the module name and a callback.

var request = require('browser-request'); // If browser-side code for browserify.
var request = require('request'); // If server-side node code.
var readmeGetter = require('readme-getter')(request);

readmeGetter.getReadme(moduleName, function(er, readme){
    if(!er) console.log("Readme for %s is:\n %s", moduleName, readme);
});
Something went wrong with that request. Please try again.