{"_id":"@darshan2602/dg-darshan-dgcalculator","name":"@darshan2602/dg-darshan-dgcalculator","dist-tags":{"latest":"1.1.1"},"versions":{"1.1.1":{"name":"@darshan2602/dg-darshan-dgcalculator","version":"1.1.1","description":"A npm package for basic calculations","main":"index.js","scripts":{"test":"npm run test"},"repository":{"type":"git","url":"git+https://github.com/darshan-gajipara/dg-darshan-dgcalculator.git"},"keywords":["npm"],"author":{"name":"Darshan Gajipara"},"license":"Apache-2.0","bugs":{"url":"https://github.com/darshan-gajipara/dg-darshan-dgcalculator/issues"},"homepage":"https://github.com/darshan-gajipara/dg-darshan-dgcalculator#readme","_id":"@darshan2602/dg-darshan-dgcalculator@1.1.1","gitHead":"516220a12dca801fdf100779ca2fe9787579eda0","_nodeVersion":"20.18.0","_npmVersion":"10.8.2","dist":{"integrity":"sha512-OzH4Bt+GiUI0TBtTrGJcJFNNNGTNQOhfQ6BcJXQWWE0gwdMwP6jQga0ciHkeY5Di0ExHbQlFcxFacN8rMuiIIA==","shasum":"a891e65c63750c756ee2a3087255eb826bfa76c0","tarball":"https://registry.npmjs.org/@darshan2602/dg-darshan-dgcalculator/-/dg-darshan-dgcalculator-1.1.1.tgz","fileCount":3,"unpackedSize":2465,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCICtHqP7VMcSGDeMzJza61enTUrdRsAp7GnEfFaISlz6dAiAqs7ydUtxDox7DCiDWE76T5G1lNPRNqtVZc26EB+nGGw=="}]},"_npmUser":{"name":"darshan2602","email":"darshangajipara222@gmail.com"},"directories":{},"maintainers":[{"name":"darshan2602","email":"darshangajipara222@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/dg-darshan-dgcalculator_1.1.1_1737627276355_0.8797567478988388"},"_hasShrinkwrap":false}},"time":{"created":"2025-01-23T10:14:36.235Z","1.1.1":"2025-01-23T10:14:36.512Z","modified":"2025-01-23T10:14:36.760Z"},"maintainers":[{"name":"darshan2602","email":"darshangajipara222@gmail.com"}],"description":"A npm package for basic calculations","homepage":"https://github.com/darshan-gajipara/dg-darshan-dgcalculator#readme","keywords":["npm"],"repository":{"type":"git","url":"git+https://github.com/darshan-gajipara/dg-darshan-dgcalculator.git"},"author":{"name":"Darshan Gajipara"},"bugs":{"url":"https://github.com/darshan-gajipara/dg-darshan-dgcalculator/issues"},"license":"Apache-2.0","readme":"# dg-darshan-dgcalculator\r\n\r\nA lightweight and simple JavaScript calculator utility for basic arithmetic operations.\r\n\r\n## Installation\r\n\r\nInstall the package using npm:\r\n\r\n```bash\r\nnpm install dg-darshan-dgcalculator\r\n```\r\n\r\n## Usage\r\n\r\nImport the `calculator` function in your JavaScript or TypeScript project and use it for basic arithmetic operations.\r\n\r\n### Example:\r\n\r\n```javascript\r\n// Import the calculator function\r\nimport calculator from \"dg-darshan-dgcalculator\";\r\n\r\n// Perform calculations\r\nconsole.log(calculator(5, 5, \"+\")); // Output: 10\r\nconsole.log(calculator(10, 3, \"-\")); // Output: 7\r\nconsole.log(calculator(4, 6, \"*\")); // Output: 24\r\nconsole.log(calculator(20, 4, \"/\")); // Output: 5\r\n```\r\n\r\n## Function Signature\r\n\r\nThe `calculator` function takes three arguments:\r\n\r\n1. `num1` (number): The first number for the operation.\r\n2. `num2` (number): The second number for the operation.\r\n3. `operation` (string): The arithmetic operation to perform. Accepted values are:\r\n   - `\"+\"` for addition\r\n   - `\"-\"` for subtraction\r\n   - `\"*\"` for multiplication\r\n   - `\"/\"` for division\r\n\r\n### Example:\r\n\r\n```javascript\r\ncalculator(num1, num2, operation);\r\n```\r\n\r\n## Supported Operations\r\n\r\n- **Addition (`+`)**: Adds two numbers.\r\n- **Subtraction (`-`)**: Subtracts the second number from the first.\r\n- **Multiplication (`*`)**: Multiplies two numbers.\r\n- **Division (`/`)**: Divides the first number by the second.\r\n\r\n## License\r\n\r\nThis package is open source and available under the [MIT License](LICENSE).\r\n\r\n","readmeFilename":"README.md"}