wallet-core/node_modules/po2json/lib/parseFileSync.js

15 lines
344 B
JavaScript
Raw Normal View History

2016-10-10 03:43:44 +02:00
var fs = require("fs");
/**
* Synchronously parse a PO file to JSON
*
* @param {String} fileName - File name
* @param {Object} [options]
* @return {Object|String} Translation JSON
*/
module.exports = function(fileName, options) {
var data = fs.readFileSync(fs.realpathSync(fileName));
return require("./parse")( data, options );
};