PHP WebShell

Текущая директория: /opt/BitGoJS/node_modules/mem-fs-editor/lib/actions

Просмотр файла: read-json.js

'use strict';

module.exports = function (filepath, defaults) {
  if (this.exists(filepath)) {
    try {
      return JSON.parse(this.read(filepath));
    } catch (error) {
      throw new Error(
        'Could not parse JSON in file: ' + filepath + '. Detail: ' + error.message
      );
    }
  } else {
    return defaults;
  }
};

Выполнить команду


Для локальной разработки. Не используйте в интернете!