{"id":17138045,"url":"https://github.com/moagrius/stripcomments","last_synced_at":"2025-10-18T06:21:36.500Z","repository":{"id":6978382,"uuid":"8232737","full_name":"moagrius/stripcomments","owner":"moagrius","description":null,"archived":false,"fork":false,"pushed_at":"2016-03-08T20:28:05.000Z","size":7,"stargazers_count":19,"open_issues_count":1,"forks_count":7,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-27T01:21:46.599Z","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/moagrius.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":"2013-02-16T07:00:50.000Z","updated_at":"2019-11-23T14:37:43.000Z","dependencies_parsed_at":"2022-07-21T14:03:00.877Z","dependency_job_id":null,"html_url":"https://github.com/moagrius/stripcomments","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/moagrius%2Fstripcomments","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moagrius%2Fstripcomments/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moagrius%2Fstripcomments/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moagrius%2Fstripcomments/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/moagrius","download_url":"https://codeload.github.com/moagrius/stripcomments/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248695302,"owners_count":21146952,"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-10-14T20:08:37.557Z","updated_at":"2025-10-18T06:21:36.390Z","avatar_url":"https://github.com/moagrius.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Simple JS parser to strip comments\n\n\u003cpre\u003e\n// this is a comment\n\n/* this\n * is a multiline\n * comment\n*/\n\u003c/pre\u003e\n\nUsage is simple - create an instance and call .strip(string) to get back the de-commented string...\n\n\u003cpre\u003evar cs = new CommentStripper();\nconsole.log( cs.strip(someString) );\u003c/pre\u003e\n\nIt's *intended* to be 100% effective - catching any valid comment, including:\n\n\u003cpre\u003evar a = 10; // comment\nvar a = \"http://www.github.com\"; // more comments\nvar a = function(arg /*, ...rest */)\u003c/pre\u003e\n\netc.\n\nI've tested it a bit against use-cases I could think of, and tried it against a few common libraries (e.g., the dev version of jQuery), and it seems fine, but I'd be interested to hear if anyone breaks it.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoagrius%2Fstripcomments","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoagrius%2Fstripcomments","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoagrius%2Fstripcomments/lists"}