{"id":20285819,"url":"https://github.com/tpkn/has-cyr","last_synced_at":"2026-06-04T18:31:04.294Z","repository":{"id":57261482,"uuid":"113899028","full_name":"tpkn/has-cyr","owner":"tpkn","description":"Module that searches for cyrillic letters in the text","archived":false,"fork":false,"pushed_at":"2019-07-16T13:43:29.000Z","size":49,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-14T08:12:51.206Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tpkn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-12-11T19:24:19.000Z","updated_at":"2019-07-16T13:43:31.000Z","dependencies_parsed_at":"2022-08-25T05:10:47.270Z","dependency_job_id":null,"html_url":"https://github.com/tpkn/has-cyr","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tpkn%2Fhas-cyr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tpkn%2Fhas-cyr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tpkn%2Fhas-cyr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tpkn%2Fhas-cyr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tpkn","download_url":"https://codeload.github.com/tpkn/has-cyr/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241780512,"owners_count":20019061,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-14T14:29:05.416Z","updated_at":"2025-03-04T04:11:15.266Z","avatar_url":"https://github.com/tpkn.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Has Cyr [![npm Package](https://img.shields.io/npm/v/has-cyr.svg)](https://www.npmjs.org/package/has-cyr)\n\nModule that searches for cyrillic characters in the text. It can highlight each cyrillic character or group of characters, or just transliterate them.\n\n![preview](https://raw.githubusercontent.com/tpkn/has-cyr/master/preview.png)\n\n\n## Installation\n```bash\nnpm install has-cyr\n```\n\n\n## API\n\n### hasCyr(text[, preprocessor, translit])\n\n### text\n**Type**: _String_\n\n\n### preprocessor\n**Type**: _Function_  \nFunction helps modify matches\n\n\n### translit\n**Type**: _Boolean_  \n**Default**: `false`  \nAuto transliteration of cyrillic characters\n\n\n\n\n## Usage   \n```javascript\nconst chalk = require('chalk');\nconst hasCyr = require('has-cyr');\n\nfunction chalkHighlighter(str){\n   return chalk.red.bold(str);\n}\n\nlet text = 'Lогем iрsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod темроr incididunt ut labоге et dolore magna aliqua. Ut хуй ad minim veniam, quis nostrud ехегсitation ullamco laboris nisi ut aliquip eх ea соммоdo сопsequat. Duis aute irure dolor в reprehenderit in voluptate velit esse cillum dоlоre eu fugiat nulla pariatur. Ехсерtеr sint occaecat cupidatat поп proident, sunt in сиlра qui officia deserunt mollit anim id est laborum.';\n\nlet cyr = hasCyr(text, chalkHighlighter);\nif(cyr){\n   console.log(cyr);\n}\n```\n\nAs an additional feature it can transliterate matches.\n```javascript\nlet cyr = hasCyr(text, chalkHighlighter, true);\n```\n\n![translit](https://raw.githubusercontent.com/tpkn/has-cyr/master/translit.png)\n\n## Changelog \n#### v1.0.4 (2018-11-20):\n- now consecutive cyrillic characters would be grouped together\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftpkn%2Fhas-cyr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftpkn%2Fhas-cyr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftpkn%2Fhas-cyr/lists"}