import isArray from "./isArray.mjs";
import isKey from "./_isKey.mjs";
import stringToPath from "./_stringToPath.mjs";
import toString from "./toString.mjs";
function castPath(value, object) {
  if (isArray(value)) {
    return value;
  }
  return isKey(value, object) ? [value] : stringToPath(toString(value));
}
export {
  castPath as default
};
