Added an example to the readme

This commit is contained in:
Mike Holly 2011-12-27 12:03:19 -08:00
parent 1bae2deab0
commit 9c8a80d9b3
2 changed files with 12 additions and 2 deletions

View File

@ -1,3 +1,14 @@
Used to load and save PO files.
var po = require('po');
var po = require('po')
, fs = require('fs')
po.load('text.po', function(_po){
console.log(_po.headers);
console.log(_po.items);
_po.save('copy.po', function(){
console.log('We copied a PO file for no reason!');
});
});

View File

@ -1,7 +1,6 @@
var po = require('../lib/po.js')
, fs = require('fs')
, assert = require('assert')
, exec = require('child_process').exec;
po.load('text.po', function(_po){
_po.save('copy.po', function(){