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.
Plugins/sorting/nepali-numbers.min.mjs

2 lines
531 B
JavaScript

/*! © SpryMedia Ltd, David Konrad - datatables.net/license */
import $ from"jquery";import DataTable from"datatables.net";function nepaliToLatin(e){switch(e){case"":return 0;case"१":return 1;case"२":return 2;case"३":return 3;case"४":return 4;case"५":return 5;case"६":return 6;case"७":return 7;case"८":return 8;case"९":return 9;default:return 0}}DataTable.ext.order["nepali-numbers-pre"]=function(e){for(var r="",a=0;a<e.length;a++)r+=nepaliToLatin(e.charAt(a));return parseInt(r,10)};export default DataTable;