diff --git a/lib/po.js b/lib/po.js index a0934a6..c506e9e 100644 --- a/lib/po.js +++ b/lib/po.js @@ -1,5 +1,3 @@ -var fs = require('fs'); - function trim(string) { return string.replace(/^\s+|\s+$/g, ''); } @@ -13,7 +11,7 @@ var PO = function () { }; PO.prototype.save = function (filename, callback) { - fs.writeFile(filename, this.toString(), callback); + require('fs').writeFile(filename, this.toString(), callback); }; PO.prototype.toString = function () { @@ -65,7 +63,7 @@ PO.prototype.toString = function () { }; PO.load = function (filename, callback) { - fs.readFile(filename, 'utf-8', function (err, data) { + require('fs').readFile(filename, 'utf-8', function (err, data) { if (err) { return callback(err); }