{"id":21191424,"url":"https://github.com/charakamihiranga/calculator","last_synced_at":"2026-05-16T22:01:42.103Z","repository":{"id":244361495,"uuid":"814573719","full_name":"charakamihiranga/Calculator","owner":"charakamihiranga","description":"A simple and user-friendly calculator web application that supports basic arithmetic operations and complex calculations","archived":false,"fork":false,"pushed_at":"2024-08-13T08:38:57.000Z","size":8,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-21T09:47:01.585Z","etag":null,"topics":["calculator-javascript","css","html","javascript"],"latest_commit_sha":null,"homepage":"","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/charakamihiranga.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-13T09:18:11.000Z","updated_at":"2024-12-05T02:17:36.000Z","dependencies_parsed_at":"2024-10-26T10:19:14.013Z","dependency_job_id":"49415605-419e-41a3-9d01-4a9a7f992c6a","html_url":"https://github.com/charakamihiranga/Calculator","commit_stats":null,"previous_names":["charakamihiranga/calculator","charakagamage/calculator"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/charakamihiranga/Calculator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charakamihiranga%2FCalculator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charakamihiranga%2FCalculator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charakamihiranga%2FCalculator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charakamihiranga%2FCalculator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/charakamihiranga","download_url":"https://codeload.github.com/charakamihiranga/Calculator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charakamihiranga%2FCalculator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33120450,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-16T18:38:32.183Z","status":"ssl_error","status_checked_at":"2026-05-16T18:38:29.903Z","response_time":115,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["calculator-javascript","css","html","javascript"],"created_at":"2024-11-20T19:02:55.405Z","updated_at":"2026-05-16T22:01:42.060Z","avatar_url":"https://github.com/charakamihiranga.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Calculator\n\nA simple and user-friendly calculator web application that supports basic arithmetic operations and complex calculations. The calculator can be operated using both mouse clicks and keyboard inputs.\n\n## Features\n\n- **Basic Arithmetic Operations**: Addition, Subtraction, Multiplication, and Division.\n- **Parentheses Support**: Handle complex expressions using parentheses.\n- **Percentage Calculations**: Support for percentage operations.\n- **Clear (AC) and Backspace Functionalities**: Easily clear input or delete the last character.\n- **Real-Time Input Display Formatting**: Clean and user-friendly input display.\n- **Keyboard Support**: Convenient keyboard input for quick calculations.\n\n## Installation\n\nTo use this calculator, clone the repository and open the `calculator.html` file in your web browser.\n\ngit clone https://github.com/CharakaMihiranga/calculator.git\n\ncd calculator\n\nopen calculator.html\n\n## Usage\n\n### Mouse Input\n\nClick the buttons on the calculator to input numbers and operations.\n\n### Keyboard Input\n\nYou can also use the following keyboard keys to operate the calculator:\n\n- `0-9`: Numbers\n- `+`: Addition\n- `-`: Subtraction\n- `*`: Multiplication\n- `/`: Division\n- `%`: Percentage\n- `(`, `)`: Parentheses\n- `.`: Decimal point\n- `Enter`: Equals\n- `Backspace`: Delete the last character\n- `Delete`: Clear the input\n\n## File Structure\n\n- `calculator.html`: The main HTML file that contains the structure of the calculator.\n- `style/style.css`: The CSS file for styling the calculator.\n- `js/script.js`: The JavaScript file containing the logic for the calculator.\n\n## Code Overview\n\n### HTML\n\nThe HTML file sets up the structure of the calculator. It includes buttons for each number and operation, and display areas for the input and output.\n\n### CSS\n\nThe CSS file is used to style the calculator, making it visually appealing and user-friendly.\n\n### JavaScript\n\nThe JavaScript file handles the logic of the calculator. It includes event listeners for button clicks and keyboard inputs, functions to validate and clean the input, and to prepare and display the output.\n\n## Screenshots\n\nHere are some screenshots of the calculator in action:\n\n![Screenshot 2024-06-14 131525](https://github.com/CharakaMihiranga/Calculator/assets/143955766/4d8a9786-8056-4320-a595-647d434ca4a6)\n\n![Screenshot 2024-06-14 131548](https://github.com/CharakaMihiranga/Calculator/assets/143955766/fc186e14-cfaf-4981-9347-0ff19cbc411d)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcharakamihiranga%2Fcalculator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcharakamihiranga%2Fcalculator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcharakamihiranga%2Fcalculator/lists"}