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
554 B
JavaScript

/*! © SpryMedia Ltd, David Konrad - datatables.net/license */
import jQuery from"jquery";import DataTable from"datatables.net";let $=jQuery;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.type.order["nepali-numbers-pre"]=function(e){for(var r="",t=0;t<e.length;t++)r+=nepaliToLatin(e.charAt(t));return parseInt(r,10)};export default DataTable;