{"id":26338731,"url":"https://github.com/marcoalvesalmeida/react-native-magic-flashlight","last_synced_at":"2026-05-03T01:37:00.758Z","repository":{"id":65550976,"uuid":"586525029","full_name":"marcoalvesalmeida/react-native-magic-flashlight","owner":"marcoalvesalmeida","description":"Uma biblioteca simples react native para ligar ou desligar o flash no dispositivo Android/iOS. A simple react native library to turn on or off flash on Android/iOS device.","archived":false,"fork":false,"pushed_at":"2023-01-08T13:06:59.000Z","size":422,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-04T16:48:08.200Z","etag":null,"topics":["android","flash","ios","npm-package","react-native","react-native-module","torch"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/react-native-magic-flashlight","language":"Java","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/marcoalvesalmeida.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":"2023-01-08T13:06:47.000Z","updated_at":"2023-09-25T14:03:31.000Z","dependencies_parsed_at":"2023-02-08T06:00:56.213Z","dependency_job_id":null,"html_url":"https://github.com/marcoalvesalmeida/react-native-magic-flashlight","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/marcoalvesalmeida/react-native-magic-flashlight","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcoalvesalmeida%2Freact-native-magic-flashlight","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcoalvesalmeida%2Freact-native-magic-flashlight/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcoalvesalmeida%2Freact-native-magic-flashlight/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcoalvesalmeida%2Freact-native-magic-flashlight/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marcoalvesalmeida","download_url":"https://codeload.github.com/marcoalvesalmeida/react-native-magic-flashlight/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcoalvesalmeida%2Freact-native-magic-flashlight/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32555839,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T00:31:16.350Z","status":"ssl_error","status_checked_at":"2026-05-03T00:31:15.546Z","response_time":132,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["android","flash","ios","npm-package","react-native","react-native-module","torch"],"created_at":"2025-03-16T03:14:46.810Z","updated_at":"2026-05-03T01:37:00.736Z","avatar_url":"https://github.com/marcoalvesalmeida.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-native-magic-flashlight\n\nA simple library to turn on or off flash on Android/iOS device.\n\n## Installation\n\n```sh\nnpm install react-native-magic-flashlight\n```\n\n## Usage\n\n```js\nimport {\n  toggleFlash,\n  isFlashOn,\n  hasFlash,\n} from 'react-native-magic-flashlight';\n\n// ...\n\nfunction deviceHasFlash() {\n  hasFlash(\n    () =\u003e console.log('Has Flash'),\n    () =\u003e console.log('No Flash')\n  );\n}\n\nfunction turnOn() {\n  toggleFlash(\n    true,\n    () =\u003e console.log('Success'),\n    () =\u003e console.log('Error')\n  );\n}\n\nfunction flashIsOn() {\n  const result = isFlashOn((on) =\u003e on);\n  console.log(result);\n}\n```\n\n## Contributing\n\nSee the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.\n\n## License\n\nMIT\n\n---\n\nCreated by [Marco Almeida](https://github.com/marcoalvesalmeida)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcoalvesalmeida%2Freact-native-magic-flashlight","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarcoalvesalmeida%2Freact-native-magic-flashlight","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcoalvesalmeida%2Freact-native-magic-flashlight/lists"}