summaryrefslogtreecommitdiff
path: root/tools/eslint/node_modules/lodash/internal/toPath.js
diff options
context:
space:
mode:
Diffstat (limited to 'tools/eslint/node_modules/lodash/internal/toPath.js')
-rw-r--r--tools/eslint/node_modules/lodash/internal/toPath.js28
1 files changed, 0 insertions, 28 deletions
diff --git a/tools/eslint/node_modules/lodash/internal/toPath.js b/tools/eslint/node_modules/lodash/internal/toPath.js
deleted file mode 100644
index d29f1eb528..0000000000
--- a/tools/eslint/node_modules/lodash/internal/toPath.js
+++ /dev/null
@@ -1,28 +0,0 @@
-var baseToString = require('./baseToString'),
- isArray = require('../lang/isArray');
-
-/** Used to match property names within property paths. */
-var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g;
-
-/** Used to match backslashes in property paths. */
-var reEscapeChar = /\\(\\)?/g;
-
-/**
- * Converts `value` to property path array if it's not one.
- *
- * @private
- * @param {*} value The value to process.
- * @returns {Array} Returns the property path array.
- */
-function toPath(value) {
- if (isArray(value)) {
- return value;
- }
- var result = [];
- baseToString(value).replace(rePropName, function(match, number, quote, string) {
- result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));
- });
- return result;
-}
-
-module.exports = toPath;