index.js
function parseObj (input) {
  try {
    return require(path.resolve(input));
  } catch (e) {
    var str;
    try {
      str = fs.readFileSync(program.obj, 'utf8');
    } catch (e) {
      str = program.obj;
    }
    try {
      return JSON.parse(str);
    } catch (e) {
      return eval('(' + str + ')');
    }
  }
}
function parseObj (input) {
  try {
    return require(path.resolve(input));
  } catch (e) {
    var str;
    try {
      str = fs.readFileSync(program.obj, 'utf8');
    } catch (e) {
      str = program.obj;
    }
    try {
      return JSON.parse(str);
    } catch (e) {
      return eval('(' + str + ')');
    }
  }
}
function parseObj ( input ) { try { return require ( path . resolve ( input ) ) ; } catch ( e ) { var str ; try { str = fs . readFileSync ( program . obj , 'utf8' ) ; } catch ( e ) { str = program . obj ; } try { return JSON . parse ( str ) ; } catch ( e ) { return eval ( '(' + str + ')' ) ; } } }
Parse object either in `input` or in the file called `input`. The latter is
searched first.
Parse object either in input or in the file called input . The latter is searched first .