You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2 lines
763 B
JavaScript
2 lines
763 B
JavaScript
/*! © SpryMedia Ltd, Dominique Fournier, Brad Wasson, Peter Vilhan, Kevin Gilkey-Graham - datatables.net/license */
|
|
import DataTable from"datatables.net";DataTable.ext.order["ip-address-pre"]=function(t){var e,l,r,a,s,n;if(!t)return"000000000000";if(2==(r=(t=t.replace(/<[\s\S]*?>/g,"")).split(":")).length?(l=r[0].split("."),a=r[1]):l=t.split("."),f=t.split(":"),n=s="",4==l.length){for(i=0;i<l.length;i++)e=l[i],s+="000".substr(e.length)+e;a&&(s+=":"+"00000".substr(a.length)+a)}else if(0<f.length){for(var g=0,i=0;i<f.length;i++)0<i&&(n+=":"),0===(e=f[i]).length?g+=0:(n+="0000".substr(e.length)+e,g+=4);var f=n.split(":"),h=0;for(i=0;i<f.length;i++)if(0===(e=f[i]).length&&0===h)for(var p=0;p<32-g;p++)s+="0",h=1;else s+=e}return s};export default DataTable; |