mikeedwards/po2json — pull request #6 by danmactough (2012-10-17 20:27:05+00:00)
Title: Bug fixes, enhancements, and an API change

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 callback, 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