{"id":23063467,"url":"https://github.com/julienetie/run-once","last_synced_at":"2025-04-03T08:14:03.437Z","repository":{"id":89939265,"uuid":"71178735","full_name":"julienetie/run-once","owner":"julienetie","description":"Simply do something once, or once under a condition","archived":false,"fork":false,"pushed_at":"2016-10-17T20:59:01.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-29T11:36:03.505Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/julienetie.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-10-17T20:33:14.000Z","updated_at":"2016-10-17T20:48:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"35b63cc1-d4f2-4a1b-8c24-700bbdd7ba6c","html_url":"https://github.com/julienetie/run-once","commit_stats":{"total_commits":7,"total_committers":2,"mean_commits":3.5,"dds":0.1428571428571429,"last_synced_commit":"f0a54a4aa461cfeb176d943400ed2921ea2d7166"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/julienetie%2Frun-once","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/julienetie%2Frun-once/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/julienetie%2Frun-once/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/julienetie%2Frun-once/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/julienetie","download_url":"https://codeload.github.com/julienetie/run-once/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246961931,"owners_count":20861185,"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-12-16T04:10:31.063Z","updated_at":"2025-04-03T08:14:03.403Z","avatar_url":"https://github.com/julienetie.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# run-once\nSimply do something once, or once under a condition using custom namespaces.\n\n```javascript\nfunction colorOfTheSky(color){\n  var skyColor\n  if(once('colorOfTheSky')){\n   skyColor = 'The sky is' + color \n  }else{\n   skyColor = 'The sky is falling'\n  }\n  console.log(skyColor)\n}\ncolorOfTheSky('blue')\n// Run once: The sky is blue\n// Run again: The sky is falling\n// Run and on: The sky is faling\n// ...\n```\n***\n```javascript\nfunction colorOfTheSky(color){\n  var skyColor\n  if(once('colorOfTheSky' + color)){\n   skyColor = 'The sky is' + color \n  }else{\n   skyColor = 'The sky is falling'\n  }\n  console.log(skyColor)\n}\ncolorOfTheSky('blue')\n// Run once: The sky is blue\n// Run again: The sky is falling\n// Run and on: The sky is faling\n// ...\ncolorOfTheSky('red')\n// Run once: The sky is red\n// Run again: The sky is falling\n// Run and on: The sky is faling\n// ...\n```\n\n(c) 2016 Julien Etienne\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjulienetie%2Frun-once","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjulienetie%2Frun-once","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjulienetie%2Frun-once/lists"}