andrewrk / andrewrk/node-diacritics

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

オープン
#20 コメント 7 件 リアクション 0 件 担当者 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 を短くまとめたダイジェスト。