Repository URL to install this package:
|
Version:
5.0.0-rc.11 ▾
|
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var isArray = require('./isArray.js');
var toString = require('./toString.js');
var _isKey = require('./_isKey.js');
var _stringToPath = require('./_stringToPath.js');
/**
* Casts `value` to a path array if it's not one.
*
* @private
* @param {*} value The value to inspect.
* @param {Object} [object] The object to query keys on.
* @returns {Array} Returns the cast property path array.
*/
function castPath(value, object) {
if (isArray.default(value)) {
return value;
}
return _isKey.default(value, object) ? [value] : _stringToPath.default(toString.default(value));
}
var _castPath = castPath;
exports.__moduleExports = _castPath;
exports.default = _castPath;
//# sourceMappingURL=_castPath.js.map