summaryrefslogtreecommitdiff
path: root/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/baseSortBy.js
diff options
context:
space:
mode:
Diffstat (limited to 'tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/baseSortBy.js')
-rw-r--r--tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/baseSortBy.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/baseSortBy.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/baseSortBy.js
new file mode 100644
index 0000000000..fec0afeb78
--- /dev/null
+++ b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/baseSortBy.js
@@ -0,0 +1,21 @@
+/**
+ * The base implementation of `_.sortBy` which uses `comparer` to define
+ * the sort order of `array` and replaces criteria objects with their
+ * corresponding values.
+ *
+ * @private
+ * @param {Array} array The array to sort.
+ * @param {Function} comparer The function to define sort order.
+ * @returns {Array} Returns `array`.
+ */
+function baseSortBy(array, comparer) {
+ var length = array.length;
+
+ array.sort(comparer);
+ while (length--) {
+ array[length] = array[length].value;
+ }
+ return array;
+}
+
+module.exports = baseSortBy;