{"id":26664029,"url":"https://github.com/dmytrovoitovych/character-counter","last_synced_at":"2026-05-10T09:39:10.465Z","repository":{"id":280189363,"uuid":"937593751","full_name":"DmytroVoitovych/Character-Counter","owner":"DmytroVoitovych","description":"This app counts letters, sentences, words and shows letter statistic.","archived":false,"fork":false,"pushed_at":"2025-03-01T21:10:42.000Z","size":479,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-01T21:25:51.683Z","etag":null,"topics":["animejs","css","javascript","regex-pattern"],"latest_commit_sha":null,"homepage":"https://dmytrovoitovych.github.io/Character-Counter/","language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DmytroVoitovych.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-23T12:57:17.000Z","updated_at":"2025-03-01T21:15:43.000Z","dependencies_parsed_at":"2025-03-01T21:25:54.239Z","dependency_job_id":"01cb2ef2-c0b0-4c99-91a3-652c13b417d8","html_url":"https://github.com/DmytroVoitovych/Character-Counter","commit_stats":null,"previous_names":["dmytrovoitovych/character-counter"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DmytroVoitovych%2FCharacter-Counter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DmytroVoitovych%2FCharacter-Counter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DmytroVoitovych%2FCharacter-Counter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DmytroVoitovych%2FCharacter-Counter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DmytroVoitovych","download_url":"https://codeload.github.com/DmytroVoitovych/Character-Counter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245495825,"owners_count":20624806,"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":["animejs","css","javascript","regex-pattern"],"created_at":"2025-03-25T15:56:08.286Z","updated_at":"2026-05-10T09:39:10.425Z","avatar_url":"https://github.com/DmytroVoitovych.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Frontend Mentor - Character counter solution\n\nThis is a solution to the [Character counter challenge on Frontend Mentor](https://www.frontendmentor.io/challenges/character-counter-znSgeWs_i6). Frontend Mentor challenges help you improve your coding skills by building realistic projects. \n\n## Table of contents\n\n- [Overview](#overview)\n  - [The challenge](#the-challenge)\n  - [Screenshot](#screenshot)\n  - [Links](#links)\n- [My process](#my-process)\n  - [Built with](#built-with)\n  - [What I learned](#what-i-learned)\n  - [Continued development](#continued-development)\n  - [Useful resources](#useful-resources)\n- [Author](#author)\n\n\n**Note: Delete this note and update the table of contents based on what sections you keep.**\n\n## Overview\n\n### The challenge\n\nUsers should be able to:\n\n- Analyze the character, word, and sentence counts for their text\n- Exclude/Include spaces in their character count\n- Set a character limit\n- Receive a warning message if their text exceeds their character limit\n- See the approximate reading time of their text\n- Analyze the letter density of their text\n- Select their color theme\n- View the optimal layout for the interface depending on their device's screen size\n- See hover and focus states for all interactive elements on the page\n\n### Screenshot\n\n![](./preview.jpg)\n\n\n\n### Links\n\n- Solution URL: [Github](https://github.com/DmytroVoitovych/Character-Counter)\n- Live Site URL: [Live Page](https://dmytrovoitovych.github.io/Character-Counter/)\n\n## My process\n\n### Built with\n\n- Semantic HTML5 markup\n- CSS custom properties\n- Flexbox\n- CSS Grid\n- Mobile-first workflow\n- [React](https://reactjs.org/) - JS library\n- [Anime.js](https://nextjs.org/) - Animation library\n\n### What I learned\n\nWorking on this task allowed me to gain a deeper understanding of regular expressions. I focused on identifying optimal patterns for sentence and word detection that would work across multiple languages. Additionally, I discovered valuable CSS properties such as interpolate-size, which significantly enhances animation possibilities and provides more flexible control over dynamic content sizing. \n\nMy variant to create letters list, see below:\n\n```js\n// Function analyzes text character frequency and renders statistics\nconst setStatistic = (text, renderFunction, outerEl) =\u003e {\n    // Extract only letter characters using Unicode-aware regex\n    const onlyLetters = text.match(/\\p{L}/gu);\n\n    // Clear container and exit if no letters found\n    if(!onlyLetters?.length){ \n        outerEl.hasChildNodes() \u0026\u0026 outerEl.replaceChildren();\n        return;\n    }\n        \n    const arrForRender = [];\n  \n    // Count frequency of each letter (case-insensitive)\n    const firstInteration = onlyLetters.reduce((acc, e) =\u003e {\n      acc[e.toUpperCase()] = (acc[e.toUpperCase()] || 0) + 1;\n      return acc;\n    }, {});\n  \n    // Format data with letter, count and percentage\n    for (const key in firstInteration) {\n       arrForRender.push({\n          letter: key,\n          amount: firstInteration[key],\n          percent: `(${((100 * firstInteration[key]) / onlyLetters.length).toFixed(2)}%)`,\n       });\n    }\n\n    // Sort by frequency (highest first) and render results\n    const readyList = arrForRender.toSorted((a,b) =\u003e b.amount - a.amount);\n    renderFunction(readyList, outerEl, btnShow);\n};\n```\n\n### Continued development\n\nFor my upcoming projects, I plan to explore server-side frameworks since they're generating significant buzz in the development community.\n\n\n\n### Useful resources\n\n- [Animate to height](https://developer.chrome.com/docs/css-ui/animate-to-height-auto) - Good article where you can finde more about future animation\n- [Regex tester](https://regex101.com) - Good platform to teset regular exspression.\n\n\n\n## Author\n\n- Website - [Dmytro Voitovych](https://portfolio-dmytrovoitovych.vercel.app/)\n- Frontend Mentor - [@dmytrovoitovych](https://www.frontendmentor.io/profile/DmytroVoitovych)\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmytrovoitovych%2Fcharacter-counter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdmytrovoitovych%2Fcharacter-counter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmytrovoitovych%2Fcharacter-counter/lists"}