{"id":20391078,"url":"https://github.com/compactjs/limit","last_synced_at":"2025-03-05T00:14:37.438Z","repository":{"id":38174783,"uuid":"254745810","full_name":"CompactJS/limit","owner":"CompactJS","description":"Limits a value to a defined range","archived":false,"fork":false,"pushed_at":"2023-03-04T11:30:10.000Z","size":2531,"stargazers_count":0,"open_issues_count":7,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-16T19:48:33.714Z","etag":null,"topics":["degrees","hours","javascript","limit","minutes","range"],"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/CompactJS.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2020-04-10T22:09:10.000Z","updated_at":"2021-07-21T20:47:58.000Z","dependencies_parsed_at":"2025-01-15T09:48:20.000Z","dependency_job_id":"8bb76256-b3d8-4ff1-a0c1-61b009f1863b","html_url":"https://github.com/CompactJS/limit","commit_stats":{"total_commits":14,"total_committers":4,"mean_commits":3.5,"dds":0.7142857142857143,"last_synced_commit":"39c62d148b0b790ee4df4d54a7fde1cb16440bad"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CompactJS%2Flimit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CompactJS%2Flimit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CompactJS%2Flimit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CompactJS%2Flimit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CompactJS","download_url":"https://codeload.github.com/CompactJS/limit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241940579,"owners_count":20045883,"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":["degrees","hours","javascript","limit","minutes","range"],"created_at":"2024-11-15T03:28:40.590Z","updated_at":"2025-03-05T00:14:37.419Z","avatar_url":"https://github.com/CompactJS.png","language":"JavaScript","readme":"\u003ch1 align=\"center\"\u003e@compactjs/limit\u003c/h1\u003e\n\u003ch3 align=\"center\"\u003eLimits a value to a defined range\u003c/h3\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.npmjs.com/package/@compactjs/limit\" target=\"_blank\"\u003e\n    \u003cimg alt=\"Version\" src=\"https://img.shields.io/npm/v/@compactjs/limit.svg\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/CompactJS/limit/blob/main/LICENSE\" target=\"_blank\"\u003e\n    \u003cimg alt=\"License: MIT\" src=\"https://img.shields.io/github/license/CompactJS/limit\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  ·\n  \u003ca href=\"https://github.com/CompactJS/limit#readme\"\u003eHomepage\u003c/a\u003e\n  ·\n  \u003ca href=\"https://github.com/CompactJS/limit/issues\"\u003eReport Bug / Request Feature\u003c/a\u003e\n  ·\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\u003c/p\u003e\n\n## Table of Contents\n\n- [About](#What-it-does)\n- [Installation](#Install)\n- [Usage](#usage)\n- [Test](#run-tests)\n- [Contact](#contact)\n- [Contributing](#Contributing)\n- [License](#license)\n\n## What it does\n\n@compactjs/limit limits any number to a given range. If it exceeds the range, it start back at 0 and equally starts from maximum value if it falls below 0.\n\nUse it to easily calculate hours, minutes or degrees.\n\n## Install\n\n### NPM:\n\n```sh\nnpm install @compactjs/limit\n```\n\n### CDN:\n\n```html\n\u003cscript src=\"https://unpkg.com/@compactjs/limit/dist/index.umd.js\"\u003e\u003c/script\u003e\n```\n\n\n## Usage\n\n### As module:\n\n```javascript\nimport { limit } from '@compactjs/limit';\n```\n\n### Example:\n\n```javascript\n// hours\nlimit(25, 24); // returns: 1\n\n// degrees\nlimit(90 - 180, 360); // returns: 270\n```\n\n\n## Run tests\n\n```sh\nnpm run test\n```\n\n\n## Contact\n\n\n👤 **Timo Bechtel \u003ctimo@bechtel.solutions\u003e**\n\n- Website: https://timobechtel.com\n- Twitter: [@TimoBechtel](https://twitter.com/TimoBechtel)\n- GitHub: [@TimoBechtel](https://github.com/TimoBechtel)\n\n## 🤝 Contributing\n\nContributions, issues and feature requests are welcome!\u003cbr /\u003e\n\n1. Check [issues](https://github.com/CompactJS/limit/issues)\n1. Fork the Project\n1. Create your Feature Branch (`git checkout -b feat/AmazingFeature`)\n1. Test your changes `npm run test`\n1. Commit your Changes (`git commit -m 'feat: add amazingFeature'`)\n1. Push to the Branch (`git push origin feat/AmazingFeature`)\n1. Open a Pull Request\n\n\n\n### Commit messages\n\nThis project uses semantic-release for automated release versions. So commits in this project follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0-beta.2/) guidelines. I recommend using [commitizen](https://github.com/commitizen/cz-cli) for automated commit messages.\n\n## Show your support\n\nGive a ⭐️ if this project helped you!\n\n## 📝 License\n\nDistributed under the [MIT](https://github.com/CompactJS/limit/blob/main/LICENSE) License.\n\n---\n\n_This README was generated with ❤️ by [readme-md-generator](https://github.com/kefranabg/readme-md-generator)_\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcompactjs%2Flimit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcompactjs%2Flimit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcompactjs%2Flimit/lists"}