Version 1
[yaffs-website] / node_modules / uncss / node_modules / lodash / internal / baseToPath.js
diff --git a/node_modules/uncss/node_modules/lodash/internal/baseToPath.js b/node_modules/uncss/node_modules/lodash/internal/baseToPath.js
new file mode 100644 (file)
index 0000000..dafdfcf
--- /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;