1 | import isArray from './isArray';
|
2 | import stringToPath from './_stringToPath';
|
3 |
|
4 | /**
|
5 | * Casts `value` to a path array if it's not one.
|
6 | *
|
7 | * @private
|
8 | * @param {*} value The value to inspect.
|
9 | * @returns {Array} Returns the cast property path array.
|
10 | */
|
11 | function baseCastPath(value) {
|
12 | return isArray(value) ? value : stringToPath(value);
|
13 | }
|
14 |
|
15 | export default baseCastPath;
|