{"id":18870377,"url":"https://github.com/streetstrider/secator","last_synced_at":"2026-02-14T17:30:14.731Z","repository":{"id":24326670,"uuid":"27723528","full_name":"StreetStrider/secator","owner":"StreetStrider","description":"get rid of debug branches in JavaScript code","archived":false,"fork":false,"pushed_at":"2014-12-08T17:52:35.000Z","size":144,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-30T23:47:25.448Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/StreetStrider.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}},"created_at":"2014-12-08T16:22:27.000Z","updated_at":"2014-12-08T17:52:35.000Z","dependencies_parsed_at":"2022-08-02T16:45:19.085Z","dependency_job_id":null,"html_url":"https://github.com/StreetStrider/secator","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/StreetStrider%2Fsecator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StreetStrider%2Fsecator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StreetStrider%2Fsecator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StreetStrider%2Fsecator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StreetStrider","download_url":"https://codeload.github.com/StreetStrider/secator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239816510,"owners_count":19701755,"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-11-08T05:19:53.710Z","updated_at":"2026-02-14T17:30:14.664Z","avatar_url":"https://github.com/StreetStrider.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# secator\n**secator** for JavaScript debug branches of code. Instead of having debug code and configuration variable which controls it — just remove all debug entries in production.\n\nConsider the following code:\n```javascript\nfunction debug () {\n\t// control this parameter in development\n\t// to run `debug` or `release` branches\n\t// or any other features\n\treturn true;\n}\n\nif (debug()) {\n\tconsole.log('some debug code');\n\tconsole.log('debug_run', +new Date);\n} else {\n\tapp.feedback.log('some debug code');\n}\n```\n\nThen run `secator file.js`. The `if` statement would be replaced with the only `else`-statement contents (if present).\n```javascript\napp.feedback.log('some debug code');\n```\n\nsecator only works with `debug()` function and only in positive form (`!debug()` would not be transformed), which can be used to prevent false positive transformations.\n\nThis is a fun experiment comparing two different aproaches: feature-gates vs code transforming. The second one creates lower code footprint, but requires preprocessing of all files involved. It can be used as transformation step before minification and other build steps.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstreetstrider%2Fsecator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstreetstrider%2Fsecator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstreetstrider%2Fsecator/lists"}