{"id":17169015,"url":"https://github.com/sant123/ohm-r","last_synced_at":"2026-02-11T11:33:41.991Z","repository":{"id":15065525,"uuid":"77499671","full_name":"sant123/ohm-r","owner":"sant123","description":"Discover the capacitance of your resistance.","archived":false,"fork":false,"pushed_at":"2023-01-06T01:56:05.000Z","size":929,"stargazers_count":1,"open_issues_count":12,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-16T12:43:23.277Z","etag":null,"topics":["ohm","resistance"],"latest_commit_sha":null,"homepage":null,"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/sant123.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":"2016-12-28T03:23:18.000Z","updated_at":"2020-07-18T15:34:04.000Z","dependencies_parsed_at":"2023-01-14T07:00:15.747Z","dependency_job_id":null,"html_url":"https://github.com/sant123/ohm-r","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sant123/ohm-r","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sant123%2Fohm-r","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sant123%2Fohm-r/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sant123%2Fohm-r/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sant123%2Fohm-r/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sant123","download_url":"https://codeload.github.com/sant123/ohm-r/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sant123%2Fohm-r/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271246956,"owners_count":24725901,"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","status":"online","status_checked_at":"2025-08-19T02:00:09.176Z","response_time":63,"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":["ohm","resistance"],"created_at":"2024-10-14T23:24:40.793Z","updated_at":"2026-02-11T11:33:36.972Z","avatar_url":"https://github.com/sant123.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ohm-r\n¿Do you know how many `ohms` and `tolerance` have your resistance? With ohm-r you just have to provide the colors and you are done!\n\n## Installation\n\n```sh\n$ npm install ohm-r -g\n```\n\n## Quick Start\n\nThe quickest way to get started with ohm-r is providing the colors of your resistance like:\n\n```bash\n$ ohm-r yellow violet orange gold\n```\n\nYou will get the following output:\n\n```sh\nOhms: 47,000\nTolerance:\n    Min: 44,650\n    Max: 49,350\n```\n\n## Module\n\nYou can use it as a module like:\n\n```javascript\n    var ohm = require(\"ohm-r\");\n\n    var result = ohm.calc(\"yellow\", \"violet\", \"orange\", \"gold\");\n\n    console.log(result); //{ ohms : 47000, tolerance : { min : 44650, max : 49350 } }\n```\n\n## Typescript\n\nOhm-r has support with Typescript, that's why you can get intellisense and autocomple for colors like:\n\n```javascript\n    var ohm = require(\"ohm-r\");\n\n    var result = ohm.calc(ohm.colors.YELLOW, ohm.colors.VIOLET, ohm.colors.ORANGE, ohm.colors.GOLD);\n\n    console.log(result); //{ ohms : 47000, tolerance : { min : 44650, max : 49350 } }\n```\n\n## Validation\n\n* The `calc` method requires minimum 4 colors, otherwise it will raise an exception.\n\n```\nError: The resistance must have at least 4 colors.\n```\n\n* An invalid color will raise an exception too.\n\n```javascript\n    var ohm = require(\"ohm-r\");\n\n    var result = ohm.calc(\"pink\", ohm.colors.VIOLET, ohm.colors.ORANGE, ohm.colors.GOLD);\n```\n\n```\nError: The color \"pink\" does not exist.\n```\n\n## Inspiration\n\nThis module is inspirated by the common mistake of forgetting the value of the colors in a resistance.\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsant123%2Fohm-r","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsant123%2Fohm-r","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsant123%2Fohm-r/lists"}