{"size": 458, "ext": "js", "max_stars_repo_path": "ui-src/src/utils.js", "max_stars_repo_name": "shastrisaurabh/Junto", "max_stars_repo_stars_event_min_datetime": "2019-02-19T17:18:16.000Z", "max_stars_repo_stars_event_max_datetime": "2021-04-15T01:07:28.000Z", "max_issues_repo_path": "ui-src/src/utils.js", "max_issues_repo_name": "shastrisaurabh/Junto", "max_issues_repo_issues_event_min_datetime": "2019-02-21T10:09:43.000Z", "max_issues_repo_issues_event_max_datetime": "2021-03-10T01:18:23.000Z", "max_forks_repo_path": "ui-src/src/utils.js", "max_forks_repo_name": "shastrisaurabh/Junto", "max_forks_repo_forks_event_min_datetime": "2019-02-19T17:18:44.000Z", "max_forks_repo_forks_event_max_datetime": "2020-01-28T21:41:14.000Z"}
{"max_stars_count": 57, "max_issues_count": 55, "max_forks_count": 8, "avg_line_length": 17.6153846154, "max_line_length": 60, "alphanum_fraction": 0.6200873362}
import { Settings } from "./settings.js";

export const makeHolochainCall = function makeHolochainCall(
  connection,
  zome,
  func,
  params,
  callback
) {
  connection.then(({ callZome }) => {
    callZome(
      Settings.InstanceId,
      zome,
      func
    )(params).then(result => callback(JSON.parse(result)));
  });
};

export const isSuccess = function isSuccess(data) {
  if ("Ok" in data) {
    return true;
  } else {
    return false;
  }
};
