{"id":13565467,"url":"https://github.com/kapilkaisare/daemonizejs","last_synced_at":"2025-04-03T22:31:33.130Z","repository":{"id":19301944,"uuid":"22539489","full_name":"kapilkaisare/daemonizejs","owner":"kapilkaisare","description":"A non jQuery version of my daemonizer plugin","archived":false,"fork":false,"pushed_at":"2015-06-18T04:11:47.000Z","size":420,"stargazers_count":9,"open_issues_count":1,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-11-04T19:41:30.430Z","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/kapilkaisare.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":"2014-08-02T04:47:33.000Z","updated_at":"2023-06-10T06:25:05.000Z","dependencies_parsed_at":"2022-08-21T07:41:01.347Z","dependency_job_id":null,"html_url":"https://github.com/kapilkaisare/daemonizejs","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/kapilkaisare%2Fdaemonizejs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kapilkaisare%2Fdaemonizejs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kapilkaisare%2Fdaemonizejs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kapilkaisare%2Fdaemonizejs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kapilkaisare","download_url":"https://codeload.github.com/kapilkaisare/daemonizejs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247090248,"owners_count":20881939,"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-08-01T13:01:47.537Z","updated_at":"2025-04-03T22:31:31.416Z","avatar_url":"https://github.com/kapilkaisare.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"daemonizejs\n===========\n\nDaemonize is a tool that takes a method and returns a function with a daemon like interface (start, stop, restart).\n\nUsage\n-----\n\n\tvar testFun = function () {\n\t\t// Do something\n\t};\n\n\tvar daemon = $.daemonize(testFun, 1000);\n\n\tdaemon.start(); // will run the testFun every second.\n\tdaemon.stop(); // will stop the testFun from running.\n\tdaemon.restart(); // will stop, then start the function.\n\nYou can also specify a function that runs on the restart invocation once the daemon stops.\n\n\tvar reinit = function () {\n\t\t// Clean up\n\t};\n\n\tvar daemon2 = $.daemonize(testFun, 1000, reinit);\n\n\tdaemon2.start();\n\tdaemon2.restart(); // stops testFun, runs reinit, then starts testFun again\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkapilkaisare%2Fdaemonizejs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkapilkaisare%2Fdaemonizejs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkapilkaisare%2Fdaemonizejs/lists"}