-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sort and remove duplicates from .local.dic
#225
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! We should have a script available for that, and maybe integrate it into the linter or something. Alphabetical order can be tough to figure out manually on Friday evening 😆
Done by applying the logic: ```js [ array of terms ].sort().join('\n') ```
Done by applying the logic: ```js const sorted = arr.concat().sort(); const uniques = [...new Set( sorted )]; uniques.join('\n'); ```
d3800c4
to
eff0c54
Compare
Done by applying the logic: ```js [ array of terms ].sort((a, b) => a.localeCompare(b)); ``` See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#sorting_non-ascii_characters .
I prefer that version personally, it looks more readable to me and we can more easily spot duplications. |
initializer/nombrable | ||
Initializer/nombrable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For instance, not sure the one with an uppercase I
is still useful with /nombrable
, we couldn't spot this specific kind of duplication with the initial sorting, so I prefer your new one.
Sort and remove duplicates from
.local.dic
.