Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3062)

Unified Diff: appengine/swarming/ui/res/js/common.js

Issue 2765313002: Add proper natural sort to swarming UI (Closed)
Patch Set: Update package.json Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « appengine/swarming/ui/res/imp/tasklist/task-list-demo.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/swarming/ui/res/js/common.js
diff --git a/appengine/swarming/ui/res/js/common.js b/appengine/swarming/ui/res/js/common.js
index 989e9c400d430862eecd5fd21cd25caca8c6130e..0f0f30800492318103a8c8306835bce636ac7e56 100644
--- a/appengine/swarming/ui/res/js/common.js
+++ b/appengine/swarming/ui/res/js/common.js
@@ -17,18 +17,6 @@ this.swarming = this.swarming || function() {
return most;
};
- // naturalCompare tries to use natural sorting (e.g. sort ints by value).
- swarming.naturalCompare = function(a, b) {
- // Try numeric, aka "natural" sort and use it if ns is not NaN.
- // Javascript will try to corece these to numbers or return NaN.
- var ns = a - b;
- if (!isNaN(ns)) {
- return ns;
- }
- return String(a).localeCompare(b);
- };
-
-
swarming.stableSort = function(arr, comp) {
if (!arr || !comp) {
console.log("missing arguments to stableSort", arr, comp);
« no previous file with comments | « appengine/swarming/ui/res/imp/tasklist/task-list-demo.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698