Node.js - markdown-walker ================

npm install markdown-walker
16 downloads in the last month

Node.js - markdown-walker

Build Status

Simple directory walker that specifically looks for markdown files.


I use Markdown files for blogging, documentation, and pretty much every type of writing that I do. I'm starting to develop more and more utilities and that incorporate markdown so I wanted a module that encapsulates the finding of markdown.


npm install --save markdown-walker


The code is very simple. But it's essentially a modification of except that it emits markdown events when it discovers files that have any of the following extensions: .md, .markdown, .mkd.

Quick Example

var mdw = require('markdown-walker');

var walker = mdw('/tmp/mydir');
walker.on('markdown', function(file, stat) {
walker.on('end', function() {


constructor(dir, [options])

  • dir: The directory to walk or search.
  • options: Optional argument that only has one field: lastModified. lastModified can either be a Date object or a number that represents the number of milliseconds since the UNIX epoch, e.g: (new Date).getTime().


var mdw = require('markdown-walker')
var walker = mdw('/tmp', {lastModified: new Date('2013-04-01')})


  • markdown: Emitted when a markdown file is found.
  • notModified: Only emmitted when lastModified is set and it doesn't meet the condition.
  • modified: Only emmitted when lastModified is set and it does meet the condition.


(MIT License)

Copyright 2012-2013 JP Richardson

npm loves you