mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-04 17:07:49 +00:00
Bump to v4.0.0.
This commit is contained in:
16
internal/baseToPath.js
Normal file
16
internal/baseToPath.js
Normal file
@@ -0,0 +1,16 @@
|
||||
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;
|
||||
});
|
||||
Reference in New Issue
Block a user