{"id":18544806,"url":"https://github.com/jwngr/oscalc","last_synced_at":"2025-05-15T05:34:18.139Z","repository":{"id":23120203,"uuid":"26474801","full_name":"jwngr/OSCalc","owner":"jwngr","description":"An open source calculator library demonstrating how to maintain an open source project","archived":false,"fork":false,"pushed_at":"2014-11-25T07:04:43.000Z","size":192,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-17T09:16:52.159Z","etag":null,"topics":[],"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/jwngr.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}},"created_at":"2014-11-11T07:45:27.000Z","updated_at":"2017-12-07T05:28:38.000Z","dependencies_parsed_at":"2022-08-21T19:30:24.982Z","dependency_job_id":null,"html_url":"https://github.com/jwngr/OSCalc","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwngr%2FOSCalc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwngr%2FOSCalc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwngr%2FOSCalc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwngr%2FOSCalc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jwngr","download_url":"https://codeload.github.com/jwngr/OSCalc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254282993,"owners_count":22045131,"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":[],"created_at":"2024-11-06T20:17:44.310Z","updated_at":"2025-05-15T05:34:18.104Z","avatar_url":"https://github.com/jwngr.png","language":"JavaScript","readme":"# OSCalc\n\nOSCalc is an open source calculator library demonstrating how to organize an open source\nJavaScript project. The library is for demonstration purposes only and is not actually meant to be\nused in a production application.\n\n\n## Tutorial\n\nYou can follow along the development of this library on the [Gun.io blog](https://gun.io/blog/).\n\n1. [Project Organization](https://gun.io/blog/maintaining-an-open-source-project/)\n2. [Automating Tasks With Gulp](https://gun.io/blog/maintaining-an-open-source-project-automating-tasks-with-gulp/)\n3. Testing, Testing, Testing *(coming soon)*\n4. Deploying To The World *(coming soon)*\n\n\n## Live Demo\n\nLive demos coming soon!\n\n\n## Downloading OSCalc\n\n**WARNING: This library is not yet available and the following section is just a placeholder.**\n\nIn order to use OSCalc in your project, you need to include the file in your HTML:\n\n```html\n\u003c!-- OSCalc --\u003e\n\u003cscript src=\"js/oscalc.min.js\"\u003e\u003c/script\u003e\n```\n\nYou can download the minified and un-minified versions of the OSCalc library from the\n[releases page of this GitHub repository](https://github.com/firebase/oscalc/releases).\n\nYou can also install OSCalc via npm or Bower and its dependencies will be downloaded automatically:\n\n```bash\n$ npm install oscalc --save\n```\n\n```bash\n$ bower install oscalc --save\n```\n\n\n## API Reference\n\n### new OSCalc()\n\nCreates a new `OSCalc` instance.\n\n```javascript\nvar calc = new OSCalc();\n```\n\n### add(a, b)\n\nReturns the sum of two numbers, `a` and `b`.\n\n```javascript\ncalc.add(2, 2);      // === 4\ncalc.add(-2, 2);     // === 0\ncalc.add(5.2, 2.4);  // === 7.6\ncalc.add(0, -6.7);   // === -6.7\n```\n\n### subtract(a, b)\n\nReturns the difference between two numbers. `b` is subtracted from `a`.\n\n```javascript\ncalc.subtract(2, 2);      // === 0\ncalc.subtract(-2, 2);     // === -4\ncalc.subtract(5.2, 2.4);  // === 2.8\ncalc.subtract(0, -6.7);   // === 6.7\n```\n\n### multiply(a, b)\n\nReturns the product of two numbers, `a` and `b`.\n\n```javascript\ncalc.multiply(2, 2);      // === 4\ncalc.multiply(-2, 2);     // === -4\ncalc.multiply(5.2, 2.4);  // === 12.48\ncalc.multiply(0, -6.7);   // === 0\n```\n\n### divide(a, b)\n\nReturns the quotient of two numbers, where `a` is the dividend and `b` is the divisor.\n\n```javascript\ncalc.divide(2, 2);     // === 1\ncalc.divide(-2, 2);    // === -1\ncalc.divide(5.2, 2.4); // === 2.166...\ncalc.divide(0, -6.7);  // === 0\n```\n\n## Contributing\n\nIf you'd like to contribute to OSCalc, you'll need to run the following commands to get your\nenvironment set up:\n\n```bash\n$ git clone https://github.com/jwngr/oscalc.git\n$ cd oscalc             # go to the oscalc directory\n$ npm install -g gulp   # globally install gulp task runner\n$ npm install -g bower  # globally install Bower package manager\n$ npm install           # install local npm build / test dependencies\n$ bower install         # install local JavaScript dependencies\n$ gulp watch            # watch for source file changes\n```\n\n`gulp watch` will watch for changes in the `src/` directory and lint, concatenate, and minify the\nsource files when a change occurs. The output files - `oscalc.js` and `oscalc.min.js` - are written\nto the `dist/` directory.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjwngr%2Foscalc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjwngr%2Foscalc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjwngr%2Foscalc/lists"}