UNPKG

tablesort

Version:

A sorting component for HTML tables

6 lines 404 B
/*! * tablesort v5.7.1 (2026-04-15) * http://tristen.ca/tablesort/demo/ * Copyright (c) 2026 ; Licensed MIT */ Tablesort.extend("dotsep",function(t){return/^(\d+\.)+\d+$/.test(t)},function(t,e){t=t.split("."),e=e.split(".");for(var n,r,i=0,l=Math.max(t.length,e.length);i<l;i++)if((n=parseInt(i<t.length?t[i]:"0",10))!==(r=parseInt(i<e.length?e[i]:"0",10))){if(r<n)return-1;if(n<r)return 1}return 0});