Skip to content

Commit

Permalink
improve result sorting fallback via {numeric: true, sensitivity: 'base'}
Browse files Browse the repository at this point in the history
  • Loading branch information
leeoniya committed Dec 10, 2023
1 parent 97fb4f3 commit b6e0828
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion dist/uFuzzy.cjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

'use strict';

const cmp = new Intl.Collator('en').compare;
const cmp = new Intl.Collator('en', { numeric: true, sensitivity: 'base' }).compare;

const inf = Infinity;

Expand Down
2 changes: 1 addition & 1 deletion dist/uFuzzy.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* https://github.com/leeoniya/uFuzzy (v1.0.12)
*/

const cmp = new Intl.Collator('en').compare;
const cmp = new Intl.Collator('en', { numeric: true, sensitivity: 'base' }).compare;

const inf = Infinity;

Expand Down
2 changes: 1 addition & 1 deletion dist/uFuzzy.iife.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
var uFuzzy = (function () {
'use strict';

const cmp = new Intl.Collator('en').compare;
const cmp = new Intl.Collator('en', { numeric: true, sensitivity: 'base' }).compare;

const inf = Infinity;

Expand Down
2 changes: 1 addition & 1 deletion dist/uFuzzy.iife.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/uFuzzy.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const DEBUG = false;

const cmp = new Intl.Collator('en').compare;
const cmp = new Intl.Collator('en', { numeric: true, sensitivity: 'base' }).compare;

const inf = Infinity;

Expand Down

0 comments on commit b6e0828

Please sign in to comment.