{"id":15007676,"url":"https://github.com/pakej/simple-timer-js","last_synced_at":"2025-10-30T11:31:50.563Z","repository":{"id":57361038,"uuid":"71723573","full_name":"pakej/simple-timer-js","owner":"pakej","description":"A simple timer to show timer countdown on websites.","archived":false,"fork":false,"pushed_at":"2019-12-13T14:45:22.000Z","size":24,"stargazers_count":7,"open_issues_count":0,"forks_count":8,"subscribers_count":5,"default_branch":"develop","last_synced_at":"2024-09-28T15:21:07.061Z","etag":null,"topics":["javascript","npmjs","simple","timer","yarn"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pakej.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-10-23T19:09:57.000Z","updated_at":"2023-12-14T08:46:57.000Z","dependencies_parsed_at":"2022-09-26T16:40:50.027Z","dependency_job_id":null,"html_url":"https://github.com/pakej/simple-timer-js","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pakej%2Fsimple-timer-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pakej%2Fsimple-timer-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pakej%2Fsimple-timer-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pakej%2Fsimple-timer-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pakej","download_url":"https://codeload.github.com/pakej/simple-timer-js/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219856362,"owners_count":16556084,"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":["javascript","npmjs","simple","timer","yarn"],"created_at":"2024-09-24T19:13:21.047Z","updated_at":"2025-10-30T11:31:50.212Z","avatar_url":"https://github.com/pakej.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SimpleTimer for JavaScript\n![npm](https://img.shields.io/npm/v/simple-timer-js)\n\nA simple timer to show timer countdown on websites.\n\n## Installation\n### \u003cimg src=\"https://avatars1.githubusercontent.com/u/22247014?s=200\u0026v=4\" width=\"20\" height=\"20\"\u003e Yarn\n```bash\n$ yarn add simple-timer-js\n```\n\n### \u003cimg src=\"https://raw.githubusercontent.com/github/explore/80688e429a7d4ef2fca1e82350fe8e3517d3494d/topics/npm/npm.png\" width=\"20\" height=\"20\"\u003e NPM\n```bash\n$ npm install simple-timer-js\n```\n\n## Usage\n1. Require the `SimpleTimer`\n    ```javascript\n    var SimpleTimer = require(\"simple-timer-js\");\n    ````\n\n1. Create a new SimpleTimer instance with the expected `duration`, `timerContainer`, `originalText`.\n    ```javascript\n    var timerDurationInSeconds = 60;\n    var uniqueTimerContainerClassName = \"timer-container\";\n    var originalTextInContainer = \"\";\n    var timer = new SimpleTimer(timerDurationInSeconds, uniqueTimerContainerClassName, originalTextInContainer);\n    ```\n\n1. Call `startTimer()` to start the timer.\n    ```javascript\n    timer.startTimer();\n    ```\n\n1. If you want to force end the timer, simply call `endTimer()`. Otherwise, the timer will stop on its own, after it reaches the given `timerDuration`.\n    ```javascript\n    timer.endTimer();\n    ```\n\n## Contributing\nWe'd love to accept your patches and contributions to this project! Checkout [contributing](CONTRIBUTING.md) and [code of conduct](CODE_OF_CONDUCT.md) to learn more.\n\n## License\nRefer to the license file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpakej%2Fsimple-timer-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpakej%2Fsimple-timer-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpakej%2Fsimple-timer-js/lists"}