{"id":28223849,"url":"https://github.com/ngarbezza/js-refactorings-collection","last_synced_at":"2026-06-23T04:31:21.882Z","repository":{"id":42628821,"uuid":"340336133","full_name":"ngarbezza/js-refactorings-collection","owner":"ngarbezza","description":"A collection of simple refactorings for Javascript","archived":false,"fork":false,"pushed_at":"2025-11-27T11:59:03.000Z","size":275,"stargazers_count":1,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-30T04:52:33.595Z","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/ngarbezza.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-02-19T10:34:09.000Z","updated_at":"2025-11-27T11:59:05.000Z","dependencies_parsed_at":"2024-03-12T13:43:45.980Z","dependency_job_id":"e5d5f814-d423-49a9-9f5c-4961d78fdc11","html_url":"https://github.com/ngarbezza/js-refactorings-collection","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ngarbezza/js-refactorings-collection","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngarbezza%2Fjs-refactorings-collection","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngarbezza%2Fjs-refactorings-collection/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngarbezza%2Fjs-refactorings-collection/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngarbezza%2Fjs-refactorings-collection/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ngarbezza","download_url":"https://codeload.github.com/ngarbezza/js-refactorings-collection/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngarbezza%2Fjs-refactorings-collection/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34675970,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-23T02:00:07.161Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2025-05-18T08:10:26.952Z","updated_at":"2026-06-23T04:31:21.860Z","avatar_url":"https://github.com/ngarbezza.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Javascript Refactorings Collection\n\nA collection of simple refactorings for Javascript. It uses [Acorn](https://github.com/acornjs/acorn) for parsing the JS code.\n\n## Why\n\nImplementing refactorings is not that hard as it seems. We as developers should write our own tools if we don't have them available in our programming environments.\n\n## Refactorings list\n\n### Remove unnecessary conditional\n\nInput:\n\n```javascript\nif (a \u003e b) {\n  return true;\n} else {\n  return false;\n}\n```\n\nOutput:\n\n```javascript\nreturn a \u003e b; \n```\n\nUsage:\n\n```javascript\nconst RemoveUnnecessaryConditional = require('lib/remove_unnecessary_conditional');\n\nconst originalCode = 'if (a \u003e b) { return true } else { return false }';\nconst refactoring = new RemoveUnnecessaryConditional(originalCode);\nconst refactoredCode =  refactoring.apply();\n// refactoredCode: 'return a \u003e b'\n```\n\n## Next Steps\n\n- [ ] release NPM package\n- [ ] VSCode integration\n- [ ] Continue adding refactorings\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fngarbezza%2Fjs-refactorings-collection","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fngarbezza%2Fjs-refactorings-collection","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fngarbezza%2Fjs-refactorings-collection/lists"}