Faster version of microformat-node

I have just uploaded a new version of microformat-node. The parser now takes between 30-40 milliseconds to parse an average page, about 8 times the speed of the last version.

Features of new version

  • About 8x faster at parsing
  • Will now load onto Windows based hosting solutions correctly
  • Inbuilt cache system, which can be customised
  • Upgraded logging and trace options
  • Upgraded unit test system
  • Added support for JavaScript promise


Example: /> Code:


I have changed how the method calls work so if you are using the last version you may have to update your code. The parse methods parseHtml and parseUrl now follow the standard pattern used in node.js and return an error and data object rather than just the data object.

with URL

var microformat = require("microformat-node");

microformat.parseUrl('', function(err, data){
    // do something with data

or with raw html

var microformat = require('microformat-node');

var html = '

Glenn Jones

'; microformat.parseHtml(html, function(err, data){ // do something with data });

using a promise

var microformat = require("microformat-node");

microformat.parseUrl('').then( function(err, data){
    // do something with data
  • JavaScript
  • Microformats
  • node.js