Version 1
[yaffs-website] / node_modules / grunt-legacy-util / node_modules / lodash / _baseToPath.js
diff --git a/node_modules/grunt-legacy-util/node_modules/lodash/_baseToPath.js b/node_modules/grunt-legacy-util/node_modules/lodash/_baseToPath.js
new file mode 100644 (file)
index 0000000..eb45827
--- /dev/null
@@ -0,0 +1,16 @@
+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;