// src/utils.ts
import debug from "debug";
var debugLog = debug("@tomrpc/core");
var isArrowFunction = (func) => {
  if (typeof func === "function") {
    const source = func.toString();
    return /^\([^)]*\)\s*=>/.test(source);
  }
  return false;
};
function getHttpMethods() {
  return [
    "get",
    "post",
    "put",
    "head",
    "delete",
    "options",
    "trace",
    "copy",
    "lock",
    "mkcol",
    "move",
    "purge",
    "propfind",
    "proppatch",
    "unlock",
    "report",
    "mkactivity",
    "checkout",
    "merge",
    "m-search",
    "notify",
    "subscribe",
    "unsubscribe",
    "patch",
    "search",
    "connect"
  ];
}
function log(msg, debugFlag) {
  if (debugFlag) {
    console.log(msg);
  } else {
    debugLog(msg);
  }
}

export {
  isArrowFunction,
  getHttpMethods,
  log
};
