{"id":23510899,"url":"https://github.com/danielkov/dedjs","last_synced_at":"2025-10-27T18:37:46.230Z","repository":{"id":98242010,"uuid":"84080769","full_name":"danielkov/dedjs","owner":"danielkov","description":"Find dead JS code with decent accuracy, locally.","archived":false,"fork":false,"pushed_at":"2017-03-07T09:28:46.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-08T22:02:01.269Z","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/danielkov.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-03-06T14:10:46.000Z","updated_at":"2017-03-06T14:11:24.000Z","dependencies_parsed_at":"2023-05-18T22:00:30.450Z","dependency_job_id":null,"html_url":"https://github.com/danielkov/dedjs","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/danielkov%2Fdedjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielkov%2Fdedjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielkov%2Fdedjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielkov%2Fdedjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danielkov","download_url":"https://codeload.github.com/danielkov/dedjs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253990506,"owners_count":21995776,"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-25T12:12:43.810Z","updated_at":"2025-10-27T18:37:46.166Z","avatar_url":"https://github.com/danielkov.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DedJS Readme\n\nYou can use this module on your local machine to try to detect dead code. It is very basic, in that all it does is log and store function calls to its API.\n\n## How does it help?\n\nIf you suspect some code is dead (a.k.a.: not in use anymore) you can add `ded.js` to the top of the HTML and then initialize it. This will create reports that you can view on your local machine and see if any of the suspected code chunks receive hits. If they do, it gets reported, because it means that the code you've been suspecting dead is very much alive.\n\n## API\n\nTo initialize DedJS, you can install it locally or globally via `npm`.\n\n```sh\nnpm i -g dedjs\n```\n\nIf you've installed it globally, you can start by running:\n\n```sh\ndedjs\n```\n\nOptionally you can also pass in a number afterwards as an argument, which will determine what port the application will use. In any case, the port in use will be logged out to you on the console.\n\nThen in your code you can add this line to suspiciously dead-looking code.\n\n```js\nlet ded = new DedJS('http://localhost:3000', 'puppiesPage')\nfunction zombie (arg, another) {\n  rise()\n  eatBrains()\n  // TODO: Check if these functions are even being used.\n  ded.mark() // No worries, I've marked it for testing.\n}\n```\n\nThen you can iterate through all your website, trying to hit as many functions as you can. Click everywhere, make sure you're thorough. In the console, you'll get a link, which you can click, or alternatively, go to `http://localhost:\u003cport\u003e` to view your reports.\n\n### Warning\n\nThis application does not persist data at the moment. Make sure you run all the tests you need and in the end, remove all marks that are no longer needed.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielkov%2Fdedjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanielkov%2Fdedjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielkov%2Fdedjs/lists"}