{"id":24489114,"url":"https://github.com/kudashevs/strip-code","last_synced_at":"2026-02-17T19:02:19.363Z","repository":{"id":264434642,"uuid":"893369205","full_name":"kudashevs/strip-code","owner":"kudashevs","description":"A library that strips marked blocks of code from any type of code.","archived":false,"fork":false,"pushed_at":"2024-12-02T15:43:57.000Z","size":121,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-22T07:34:51.206Z","etag":null,"topics":["strip-code","strip-comments","strip-unwanted"],"latest_commit_sha":null,"homepage":"https://kudashevs.com/posts/2024/12/strip-code-library-and-plugins","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/kudashevs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","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":"2024-11-24T09:00:09.000Z","updated_at":"2025-01-11T11:31:51.000Z","dependencies_parsed_at":"2025-01-21T16:33:27.177Z","dependency_job_id":"8cbf0b11-1cfa-4498-a9cf-8d7c2f833b74","html_url":"https://github.com/kudashevs/strip-code","commit_stats":null,"previous_names":["kudashevs/strip-code"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kudashevs%2Fstrip-code","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kudashevs%2Fstrip-code/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kudashevs%2Fstrip-code/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kudashevs%2Fstrip-code/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kudashevs","download_url":"https://codeload.github.com/kudashevs/strip-code/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248788918,"owners_count":21161727,"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":["strip-code","strip-comments","strip-unwanted"],"created_at":"2025-01-21T16:30:48.368Z","updated_at":"2025-10-04T14:38:43.345Z","avatar_url":"https://github.com/kudashevs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Strip Code ![test workflow](https://github.com/kudashevs/strip-code/actions/workflows/run-tests.yml/badge.svg)\n==========================\n\nThe `strip-code` is a library that strips marked blocks from any type of code.\n\n\n## Install\n\n```bash\n# NPM\nnpm install --save-dev strip-code\n# Yarn\nyarn add --dev strip-code\n```\n\n\n## Usage\n\nIt strips blocks of code marked with two paired tags. A pair of tags consists of a start tag and an end tag. The format\nof each tag is `prefix name suffix` (e.g. `/* debug-start */`). The name of a start tag, name of an end tag,\nprefix, and suffix are configurable.\n```js\n/* debug-start */ \nconsole.log('debug');\n/* debug-end */\n```\n\n**Note**: The blocks cannot overlap each other.\n\n\n## Options\n\n`options.skips` is an array of environments where the processing will be skipped.\n\n`options.blocks` is an array of blocks' representations. Each element of this array describes a unique pair of tags with\nstart, end, prefix, suffix and optional replacement. These values are represented by an object with these properties or by a string:\n```\nstart: 'dev-start'           # a string defines a name for the start tag (unique) - mandatory\nend: 'dev-end'               # a string defines a name for the end tag (unique) - mandatory\nprefix: '/*'                 # a string defines the beginning of a tag (non-empty string) - optional\nsuffix: '*/'                 # a string defines the end of a tag (can be an empty string) - optional\nreplacement: 'any'           # a string defines a substitution for a removed block - optional\n```\nWhen a pair of tags is represented by a string, this string will be used to generate the names of the start and end tags\n(e.g. `string-start` and `string-end`). If prefix and suffix are not provided, the default values `/*` and `*/` will be used.\n\n\n## License\n\nThe MIT License (MIT). Please see the [License file](LICENSE.md) for more information.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkudashevs%2Fstrip-code","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkudashevs%2Fstrip-code","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkudashevs%2Fstrip-code/lists"}