{"id":16955603,"url":"https://github.com/hayaaburaed/simple-string-calculator","last_synced_at":"2026-04-12T02:36:16.119Z","repository":{"id":236864236,"uuid":"793305978","full_name":"HayaAbuRaed/simple-string-calculator","owner":"HayaAbuRaed","description":"🧮 A simple JavaScript string calculator designed for learning unit testing with Jest.","archived":false,"fork":false,"pushed_at":"2024-04-30T03:49:05.000Z","size":42,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-17T22:25:29.883Z","etag":null,"topics":["javascript","jest","unit-testing"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/HayaAbuRaed.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":"2024-04-29T00:49:53.000Z","updated_at":"2024-04-30T03:49:09.000Z","dependencies_parsed_at":"2024-05-03T00:16:07.556Z","dependency_job_id":null,"html_url":"https://github.com/HayaAbuRaed/simple-string-calculator","commit_stats":null,"previous_names":["hayaaburaed/simple-string-calculator"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/HayaAbuRaed/simple-string-calculator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HayaAbuRaed%2Fsimple-string-calculator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HayaAbuRaed%2Fsimple-string-calculator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HayaAbuRaed%2Fsimple-string-calculator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HayaAbuRaed%2Fsimple-string-calculator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HayaAbuRaed","download_url":"https://codeload.github.com/HayaAbuRaed/simple-string-calculator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HayaAbuRaed%2Fsimple-string-calculator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31702580,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-11T21:17:31.016Z","status":"online","status_checked_at":"2026-04-12T02:00:06.763Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["javascript","jest","unit-testing"],"created_at":"2024-10-13T22:12:46.512Z","updated_at":"2026-04-12T02:36:16.090Z","avatar_url":"https://github.com/HayaAbuRaed.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simple String Calculator\nThis is a simple string calculator implemented in JavaScript project, that serves as a task aimed at learning JavaScript unit testing with Jest.  The calculator function, calc, accepts mathematical expressions in the form of strings and evaluates them to return the result. The calculator supports basic arithmetic operations such as addition, subtraction, multiplication, and division.\n\n\u003cbr /\u003e\n\n## 🧮 Features\n- Supports addition, subtraction, multiplication, and division.\n- Handles negative numbers and decimal numbers correctly.\n- Follows the correct order of operations.\n- Throws errors for division by zero, invalid operators, and invalid input types.\n- Ignores numbers larger than 1000 when adding.\n- Comprehensive unit tests using Jest for ensuring functionality and reliability.\n- Achieves 100% test coverage to validate all aspects of the calculator function.\n\n\u003cbr /\u003e\n\n## 📥 Installation\nClone the repository:\n``` bash\n  git clone https://github.com/your-username/simple-string-calculator.git\n```\n\nNavigate to the project directory:\n``` bash\n  cd simple-string-calculator\n```\n\nInstall dependencies:\n``` bash\n  npm install\n```\n\n\u003cbr /\u003e\n\n## ✨ Have a Look\nRunning: ``` npm test ``` we get:\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/HayaAbuRaed/simple-string-calculator/assets/123592435/ba3c1c7d-d506-4228-952c-e1912c637ff7\" width=\"350\" alt=\"vs-coverage\" /\u003e \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp;\n  \u003cimg src=\"https://github.com/HayaAbuRaed/simple-string-calculator/assets/123592435/b0eb39e9-42ab-4550-bd8f-38c4d66a1ccd\" width=\"350\" alt=\"coverage\" /\u003e\n\u003c/p\u003e\n\n\u003cbr /\u003e \u003cbr /\u003e \u003cbr /\u003e\n\n##\n\u003cp align=\"center\"\u003e\n\t✨ I'll be glad seeing your feedback, feel free to reach out! ✨\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhayaaburaed%2Fsimple-string-calculator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhayaaburaed%2Fsimple-string-calculator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhayaaburaed%2Fsimple-string-calculator/lists"}