1 var isArray = require('./isArray'),
2 stringToPath = require('./_stringToPath');
5 * Casts `value` to a path array if it's not one.
8 * @param {*} value The value to inspect.
9 * @returns {Array} Returns the cast property path array.
11 function castPath(value) {
12 return isArray(value) ? value : stringToPath(value);
15 module.exports = castPath;