{"size": 521, "ext": "js", "max_stars_repo_path": "packages/thrift-layer/src/client-proxy.js", "max_stars_repo_name": "heavyai/metis", "max_stars_repo_stars_event_min_datetime": "2019-04-04T19:16:11.000Z", "max_stars_repo_stars_event_max_datetime": "2021-05-26T10:58:42.000Z", "max_issues_repo_path": "packages/thrift-layer/src/client-proxy.js", "max_issues_repo_name": "omnisci/metis", "max_issues_repo_issues_event_min_datetime": "2018-12-21T20:24:28.000Z", "max_issues_repo_issues_event_max_datetime": "2022-02-12T12:19:47.000Z", "max_forks_repo_path": "packages/thrift-layer/src/client-proxy.js", "max_forks_repo_name": "heavyai/metis", "max_forks_repo_forks_event_min_datetime": "2019-04-10T01:29:13.000Z", "max_forks_repo_forks_event_max_datetime": "2022-02-27T14:30:25.000Z"}
{"max_stars_count": 16, "max_issues_count": 28, "max_forks_count": 6, "avg_line_length": 26.05, "max_line_length": 63, "alphanum_fraction": 0.5355086372}
export default {
  get(target, methodName) {
    const originalMethod = target[methodName];
    return function(...args) {
      const callback = args.pop();
      if (typeof callback === "function") {
        return originalMethod.call(target, ...args, result => {
          if (result instanceof Thrift.TException) {
            callback(result);
          } else {
            callback(null, result);
          }
        });
      } else {
        originalMethod.call(target, ...args, callback);
      }
    };
  }
};
