"Her" or another fixator

    Not so long ago, the topic of using the letter "ё" in documentation and posts was discussed in the working mailing list.
    Discussion dragged on for several months ...

    Realizing the importance of the issue, I wrote yoficator on Node.js .

    With it, you can check and restore the letter "e" in any text format.

    Installation


    npm install eyo -g
    


    Recovery


    eyo file.txt > file_yo.txt
    eyo https://habrahabr.ru > habr_yo.html
    


    Check


    eyo --lint file.txt
    eyo --lint https://habrahabr.ru
    




    Regardless of the relationship to the letter "ё", it is worth noting some features.

    In regular expressions, in the ranges "ё" must be indicated separately:
    function hasRussianLetters(text) {
        return text.search(/а-яё/i) > -1;
    }
    


    When sorting words, the result is not obvious:
    ["Дуб", "Осина", "Ёлка", "Берёза"].sort(); // ["Ёлка", "Берёза", "Дуб", "Осина"]
    ["дуб", "осина", "ёлка", "берёза"].sort(); // ["берёза", "дуб", "осина", "ёлка"]
    


    References:

    Also popular now: