This commit is contained in:
Ruben Vermeersch 2021-03-09 09:22:03 +01:00
parent 11b1affe5b
commit 3535e60695
2 changed files with 3 additions and 5 deletions

6
dist/pofile.js vendored
View File

@ -1,8 +1,6 @@
require=(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){ require=(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
},{}],"pofile":[function(require,module,exports){ },{}],"pofile":[function(require,module,exports){
var fs = require('fs');
function trim(string) { function trim(string) {
return string.replace(/^\s+|\s+$/g, ''); return string.replace(/^\s+|\s+$/g, '');
} }
@ -16,7 +14,7 @@ var PO = function () {
}; };
PO.prototype.save = function (filename, callback) { PO.prototype.save = function (filename, callback) {
fs.writeFile(filename, this.toString(), callback); require('fs').writeFile(filename, this.toString(), callback);
}; };
PO.prototype.toString = function () { PO.prototype.toString = function () {
@ -68,7 +66,7 @@ PO.prototype.toString = function () {
}; };
PO.load = function (filename, callback) { PO.load = function (filename, callback) {
fs.readFile(filename, 'utf-8', function (err, data) { require('fs').readFile(filename, 'utf-8', function (err, data) {
if (err) { if (err) {
return callback(err); return callback(err);
} }

2
dist/pofile.min.js vendored

File diff suppressed because one or more lines are too long