Initial commit
[yaffs-website] / node_modules / grunt-contrib-watch / node_modules / globule / node_modules / lodash / _castPath.js
1 var isArray = require('./isArray'),
2     stringToPath = require('./_stringToPath');
3
4 /**
5  * Casts `value` to a path array if it's not one.
6  *
7  * @private
8  * @param {*} value The value to inspect.
9  * @returns {Array} Returns the cast property path array.
10  */
11 function castPath(value) {
12   return isArray(value) ? value : stringToPath(value);
13 }
14
15 module.exports = castPath;