aboutsummaryrefslogtreecommitdiff
path: root/node_modules/po2json/lib/parseFileSync.js
blob: 2110254ce929b231ca1ec4513998d3c5057fe91d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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 );
};