Files
lodash/_baseToPath.js
John-David Dalton bbd78fee4d Bump to v4.1.0.
2016-01-29 08:30:29 -08:00

17 lines
417 B
JavaScript

var isArray = require('./isArray'),
stringToPath = require('./_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);
}
module.exports = baseToPath;