{"id":22234798,"url":"https://github.com/chinsun9/time-based-sequence-character","last_synced_at":"2025-08-16T23:04:56.644Z","repository":{"id":46725849,"uuid":"409856107","full_name":"chinsun9/time-based-sequence-character","owner":"chinsun9","description":"get time based sequential string","archived":false,"fork":false,"pushed_at":"2022-04-08T02:12:43.000Z","size":137,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-01T19:35:04.574Z","etag":null,"topics":["sequence","time-based"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/time-based-sequence-character","language":"TypeScript","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/chinsun9.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":"2021-09-24T06:26:41.000Z","updated_at":"2023-03-07T02:28:29.000Z","dependencies_parsed_at":"2022-08-25T14:41:45.854Z","dependency_job_id":null,"html_url":"https://github.com/chinsun9/time-based-sequence-character","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/chinsun9/time-based-sequence-character","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chinsun9%2Ftime-based-sequence-character","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chinsun9%2Ftime-based-sequence-character/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chinsun9%2Ftime-based-sequence-character/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chinsun9%2Ftime-based-sequence-character/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chinsun9","download_url":"https://codeload.github.com/chinsun9/time-based-sequence-character/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chinsun9%2Ftime-based-sequence-character/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270781393,"owners_count":24643820,"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-16T02:00:11.002Z","response_time":91,"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":["sequence","time-based"],"created_at":"2024-12-03T02:09:37.225Z","updated_at":"2025-08-16T23:04:56.591Z","avatar_url":"https://github.com/chinsun9.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# time-based-sequence-character\n\n\u003e 시간 베이스로 문자열 반환\n\n- 매시간마다 애국가 한 음절을 반환합니다\n- 기준 시간은 `2021. 9. 24. 오후 5:46:16`로부터 시작합니다\n\n## Install\n\n```sh terminal\nnpm install time-based-sequence-character\n```\n\n## Usage\n\n```ts example.ts\n// example\nimport { getTimeBasedCharacter } from 'time-based-sequence-character';\n\n// 한 시간마다 애국가 한 음절을 반환\nconst char = getTimeBasedCharacter(new Date().getTime());\nconsole.log({ char });\n```\n\n```ts custom example.ts\n// custom example\nimport { TimeBasedSequenceCharacter } from 'time-based-sequence-character';\n\n// 현재 시간을 기준으로 10초마다 '0', '1', '0', '1', '0', '1',...\nconst curTime = new Date().getTime();\nconst tbsc = new TimeBasedSequenceCharacter({\n  baseTime: curTime,\n  gap: 10,\n  arr: ['0', '1'],\n});\nconst char = tbsc.getTimeBasedCharacter(curTime);\nconsole.log({ char }); // { char: '0' }\n\nconst postChars = [1, 2, 3, 4, 5]\n  .map((v) =\u003e v * 10 * 1000 + curTime)\n  .map((time) =\u003e tbsc.getTimeBasedCharacter(time));\nconsole.log({ postChars }); // { postChars: [ '1', '0', '1', '0', '1' ] }\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchinsun9%2Ftime-based-sequence-character","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchinsun9%2Ftime-based-sequence-character","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchinsun9%2Ftime-based-sequence-character/lists"}