{"id":16254511,"url":"https://github.com/tim-smart/torch","last_synced_at":"2025-04-08T12:48:40.903Z","repository":{"id":136212602,"uuid":"161732035","full_name":"tim-smart/torch","owner":"tim-smart","description":"A library to turn on/off a smartphone flash.","archived":false,"fork":false,"pushed_at":"2018-12-14T04:39:39.000Z","size":61,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-14T08:51:28.924Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tim-smart.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2018-12-14T04:36:02.000Z","updated_at":"2018-12-14T04:39:41.000Z","dependencies_parsed_at":null,"dependency_job_id":"5e5ba941-7976-44a2-b9cb-aafff7beefb2","html_url":"https://github.com/tim-smart/torch","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/tim-smart%2Ftorch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tim-smart%2Ftorch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tim-smart%2Ftorch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tim-smart%2Ftorch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tim-smart","download_url":"https://codeload.github.com/tim-smart/torch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247846877,"owners_count":21006090,"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":"2024-10-10T15:22:32.476Z","updated_at":"2025-04-08T12:48:40.882Z","avatar_url":"https://github.com/tim-smart.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @tim-smart/torch\n\nA small library to toggle the flash on a smartphone on/off.\n\n## API\n\nUse the `createTorch` function to create a new `Torch` instance and call `setup`\nall in one go.\n\n```typescript\nexport declare class Torch {\n  setup(): Promise\u003cvoid\u003e;\n\n  toggle(enableFlash?: boolean): Promise\u003cvoid\u003e;\n  on(): Promise\u003cvoid\u003e;\n  off(): Promise\u003cvoid\u003e;\n  stop(): void;\n}\nexport declare function createTorch(): Promise\u003cTorch\u003e;\n```\n\n## Usage\n\n```typescript\nimport { createTorch } from \"@tim-smart/torch\";\n\n(async () =\u003e {\n  const torch = await createTorch();\n  await torch.on();\n  setTimeout(() =\u003e torch.stop(), 5000);\n})();\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftim-smart%2Ftorch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftim-smart%2Ftorch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftim-smart%2Ftorch/lists"}