dafdfcf05195874c0716c6b746b9a814442beabe
[yaffs-website] / baseToPath.js
1 var isArray = require('../isArray'),
2     stringToPath = require('./stringToPath');
3
4 /**
5  * The base implementation of `_.toPath` which only converts `value` to a
6  * path if it's not one.
7  *
8  * @private
9  * @param {*} value The value to process.
10  * @returns {Array} Returns the property path array.
11  */
12 function baseToPath(value) {
13   return isArray(value) ? value : stringToPath(value);
14 }
15
16 module.exports = baseToPath;