andrewrk / andrewrk/node-diacritics

.find() method to retrieve all the group of diacritics from a specific char

未关闭
#20 7 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
JavaScript
星标
270
派生
32
PR 合并指标
30 天内没有已合并 PR

描述

Hi @andrewrk,

What do you think about this? Right now i'm facing a case where i need to have a group of all possible diacritics from a specific char. I remembered about your great list of diacritics, and that your package is named as 'diacritics', and not something like 'remove-diacritics', so i thought that would be better to extend it with one more method instead of create another package.

I already created the new method:

```
function findDiacritics(chr) {

var diacriticsFound = replacementList.find( o => o.base == chr || o.chars.indexOf(chr) >= 0 );
return (diacriticsFound)? diacriticsFound.base + diacriticsFound.chars : null;

}
```

If you think it is ok, i can send you a pull request.

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。