Skip to content

Commit

Permalink
Replace diacriticless-Module with optimized internal alternative (#842)
Browse files Browse the repository at this point in the history
As the npm-Module "diacriticless" is highly inefficient when replacing
dicritics (it iterates thousands of times multiple arrays) and the
author does not merge the proposed pull-request with a very optimized
routine of this, this optimization is now implemented locally in
vue-good-table. As #545
states, there is a performanceproblem because of the
diacriticless-implementation. So this could help fixing this issue as
well.
  • Loading branch information
senfomat authored Apr 20, 2021
1 parent 38d6267 commit a647b3e
Show file tree
Hide file tree
Showing 3 changed files with 421 additions and 2 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
},
"dependencies": {
"date-fns": "^2.17.0",
"diacriticless": "1.0.1",
"lodash.isequal": "^4.5.0"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion src/components/types/default.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import diacriticless from 'diacriticless';
import { diacriticless } from '../utils/diacritics';

const escapeRegExp = str => str.replace(/[\\^$*+?.()|[\]{}]/g, '\\$&');

Expand Down
Loading

0 comments on commit a647b3e

Please sign in to comment.