mikeedwards/po2json — pull request #7 by mikeedwards (2012-10-19 19:42:51+00:00)
Title: gh:danmactough changes and bugfixes

Changed exports.parse to use node's convetional error-first callback style
var po2json = require('po2json.js');
po2json.parse('filename', function(err, result) {
on parse complete callaback, err is an Error or null and result is the json string.
});

Added exports.parseSync for synchronous parsing
var po2json = require('po2json.js');
var json;
try {
json = po2json.parseSync('filename');
} catch (e) {};

Changed default behavior to return an object, rather than stringify.

Added options to parser, presently: "pretty" (default: true) and "stringify" (default:false)

Fixed bug in the non-pretty results.

Fixed bugs in header parsing.

Further async-ify the async parse function.

Change bin script to use conventional node callback

Change bin script to use options.stringify = true

Add quick 'n dirty argument validation to bin script
- Dan MacTough