UNPKG

vue-app-sdk

Version:
14 lines (13 loc) 344 B
import isArray from "./isArray.js"; import isKey from "./_isKey.js"; import stringToPath from "./_stringToPath.js"; import toString from "./toString.js"; function castPath(value, object) { if (isArray(value)) { return value; } return isKey(value, object) ? [value] : stringToPath(toString(value)); } export { castPath as default };