{"id":24859537,"url":"https://github.com/lzimul/timer-mission","last_synced_at":"2025-03-26T16:15:18.678Z","repository":{"id":65473063,"uuid":"417780473","full_name":"lZiMUl/timer-mission","owner":"lZiMUl","description":"Timer Mission","archived":false,"fork":false,"pushed_at":"2021-11-03T06:31:02.000Z","size":9,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-18T14:56:54.720Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/lZiMUl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2021-10-16T09:32:21.000Z","updated_at":"2021-11-03T06:31:05.000Z","dependencies_parsed_at":"2023-01-25T02:55:13.128Z","dependency_job_id":null,"html_url":"https://github.com/lZiMUl/timer-mission","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lZiMUl%2Ftimer-mission","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lZiMUl%2Ftimer-mission/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lZiMUl%2Ftimer-mission/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lZiMUl%2Ftimer-mission/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lZiMUl","download_url":"https://codeload.github.com/lZiMUl/timer-mission/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245689513,"owners_count":20656417,"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":"2025-01-31T20:31:37.051Z","updated_at":"2025-03-26T16:15:18.659Z","avatar_url":"https://github.com/lZiMUl.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# timer-mission\n\ninstall the dependency:\n```\nnpm install timer-mission --save\n```\n\n### use the instance. \n```js\n'use strict';\n\n// import dependency\nimport TimerMission from 'timer-mission';\n\n// setting event\nconst timerMission = new TimerMission([{\n  \"event\": \"goToWork\",\n  \"timer\": \"6:15:0\"\n}, {\n  \"event\": \"goOffWork\",\n  \"timer\": \"22:30:15\"\n}]);\n\n// monitor event\ntimerMission.addEventListener('goToWork', function () {\n  console.log(...arguments);\n});\n\ntimerMission.addEventListener('goOffWork' function () {\n  console.log(...arguments);\n});\n```\n\n## or use class\n```js\n'use strict';\n\n// import dependency\nimport TimerMission from 'timer-mission';\n\n// definition method class\nclass Demo extends TimerMission {\n  constructor() {\n    super(...arguments);\n    // monitor event\n    super.addEventListener('goToWork', function () {\n      console.log(...arguments);\n    });\n    super.addEventListener('goOffWork' function () {\n      console.log(...arguments);\n    });\n  }\n};\n\nnew Demo([{\n  \"event\": \"goToWork\",\n  \"timer\": \"6:15:0\"\n}, {\n  \"event\": \"goOffWork\",\n  \"timer\": \"22:30:15\"\n}]);\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flzimul%2Ftimer-mission","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flzimul%2Ftimer-mission","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flzimul%2Ftimer-mission/lists"}