Files
lodash/internal/baseToPath.js
John-David Dalton 8c26e6fd4c Bump to v4.0.0.
2016-01-13 01:10:19 -08:00

17 lines
427 B
JavaScript

define(['../isArray', './stringToPath'], function(isArray, stringToPath) {
/**
* The base implementation of `_.toPath` which only converts `value` to a
* path if it's not one.
*
* @private
* @param {*} value The value to process.
* @returns {Array} Returns the property path array.
*/
function baseToPath(value) {
return isArray(value) ? value : stringToPath(value);
}
return baseToPath;
});