{"id":18463104,"url":"https://github.com/balliasghar/calculator","last_synced_at":"2026-05-18T05:43:13.200Z","repository":{"id":61811930,"uuid":"554493429","full_name":"BalliAsghar/Calculator","owner":"BalliAsghar","description":"A Simple Calculator","archived":false,"fork":false,"pushed_at":"2022-11-07T14:46:27.000Z","size":1590,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-28T14:15:56.590Z","etag":null,"topics":["calculator","cli","node-calculator","terminal"],"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/BalliAsghar.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}},"created_at":"2022-10-19T22:53:00.000Z","updated_at":"2022-11-07T14:44:48.000Z","dependencies_parsed_at":"2023-01-21T04:15:54.771Z","dependency_job_id":null,"html_url":"https://github.com/BalliAsghar/Calculator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/BalliAsghar/Calculator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BalliAsghar%2FCalculator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BalliAsghar%2FCalculator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BalliAsghar%2FCalculator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BalliAsghar%2FCalculator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BalliAsghar","download_url":"https://codeload.github.com/BalliAsghar/Calculator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BalliAsghar%2FCalculator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33166727,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-17T22:39:12.733Z","status":"online","status_checked_at":"2026-05-18T02:00:06.436Z","response_time":71,"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":["calculator","cli","node-calculator","terminal"],"created_at":"2024-11-06T09:05:54.196Z","updated_at":"2026-05-18T05:43:13.174Z","avatar_url":"https://github.com/BalliAsghar.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# A Simple Calculator\n\nThis is a simple calculator that can perform addition, subtraction, multiplication, and division.\n\n## How to use\n\n### Clone the repository\n\n```bash\ngit clone https://github.com/BalliAsghar/Calculator\n```\n\n### Move to the directory\n\n```bash\ncd Calculator\n```\n\n### Install the dependencies\n\n```bash\nnpm install\n```\n\n# Usage\nRun the following command to open the Calculator in interactive mode\n    \n```bash\nnode index.js\n```\n**Note**: You can also use `npm install -g` to install the package globally and then use `calc` command to run the program from anywhere.\n\n## Calculator in interactive mode\n\n![gif](./calculator.gif)\n\nIn interactive mode, you can perform multiple operations one after another. To exit the interactive mode, press `Ctrl + C`. or select `Exit`\n\n\n**Note**: First type the first number, then select the operation, and then type the second number. The result will be displayed on the screen. then the result will be used as the first number for the next operation.\n\n## Command Mode\n\n## Available Commands\n\n- `add` - Adds two numbers or more\n- `sub` - Subtracts two numbers or more\n- `mul` - Multiplies two numbers or more\n- `div` - Divides two numbers or more\n- `help` - Displays the help menu\n\n## Command Usage\n\n```bash\nnode index.js add 10 5\n```\n\n## Limitations\n\n- The calculator can only perform one operation at a time. means, you can't add and subtract at the same time. e.g. `node index.js add 10 5 sub 2 1`\n- The calculator can only accept numbers with spaces between them. For example, `add 25 43` is valid, but `add 25,43` is not.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fballiasghar%2Fcalculator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fballiasghar%2Fcalculator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fballiasghar%2Fcalculator/lists"}