import _ from "lodash";

export function withPrefix(prefix: string) {
  return (path?: string | number) => {
    if (path) {
      return _.trimEnd(prefix, "/") + "/" + _.trimStart(`${path}`, "/")
    }
    return prefix;
  }
}
