# cleanup-coverage-code

> Cleanup ugly code added by code coverage tools during the test process. Like this one `__cov_Ejgcx$XN18CSfmeWn$f7vQ.f['2']++;`.

Latest version **1.0.3** (published 2015-02-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install cleanup-coverage-code
pnpm add cleanup-coverage-code
yarn add cleanup-coverage-code
bun add cleanup-coverage-code
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2015-02-04 |
| First published | 2015-01-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Charlike Make Reagent |
| Maintainers | tunnckocore |
| Keywords | clean, cleans, cleanup, cleanups, code, codes, cov, coverage, coverages, coveralls, during, express, expression, expressions, function, functions, istanbul, lib, lib-cov, match, matching, name, process, re, regex, regexp, regexps, regular, test, tests, ugly |

## Links

- npm: https://www.npmjs.com/package/cleanup-coverage-code
- Repository: https://github.com/tunnckoCore/cleanup-coverage-code
- Issues: https://github.com/tunnckoCore/cleanup-coverage-code/issues
- npm.io page: https://npm.io/package/cleanup-coverage-code

## Dependencies (1)

- [coverage-code-regex](https://npm.io/package/coverage-code-regex.md) ~1.0.2

## Alternatives

- [memory-cache](https://npm.io/package/memory-cache.md) — 795.0K weekly downloads
- [@httptoolkit/proxy-agent](https://npm.io/package/@httptoolkit/proxy-agent.md) — 11.2K weekly downloads
- [express-cache-controller](https://npm.io/package/express-cache-controller.md) — 5.3K weekly downloads
- [http-cache-middleware](https://npm.io/package/http-cache-middleware.md) — 4.5K weekly downloads
- [cache2](https://npm.io/package/cache2.md) — 1.5K weekly downloads

## Recent versions

- 1.0.3 (latest) — 2015-02-04
- 1.0.2 — 2015-01-28
- 1.0.1 — 2015-01-28
- 1.0.0 — 2015-01-28
- 0.0.0 — 2015-01-28

## README

## [![npm][npmjs-img]][npmjs-url] [![mit license][license-img]][license-url] [![build status][travis-img]][travis-url] [![coverage status][coveralls-img]][coveralls-url] [![deps status][daviddm-img]][daviddm-url]

> Cleanup ugly code (like this `__cov_Ejgcx$XN18CSfmeWn$f7vQ.f['2']++;`) added by code coverage tools during the test process.

## Install
```
npm i --save cleanup-coverage-code
npm test
```


## API
> For more use-cases see the [tests](./test.js)

### [cleanupCoverageCode](./index.js#L33)
> Cleans up the given code from code added by coverage tools.

- `<str>` **{String}** code to cleanup
- `return` **{String}** cleaned code

**Example:**

```js
var cleanupCoverageCode = require('cleanup-coverage-code');

var fixture = "var a=[1,2,3];__cov_Ejgcx$XN18CSfmeWn$f7vQ.f['2']++;var b=123;";
cleanupCoverageCode(fixture);
//=> 'var a=[1,2,3];var b=123;'

cleanupCoverageCode('var a=[1,2,3];var b=123;');
//=> 'var a=[1,2,3];var b=123;'
```


## Author
**Charlike Mike Reagent**
+ [gratipay/tunnckoCore][author-gratipay]
+ [twitter/tunnckoCore][author-twitter]
+ [github/tunnckoCore][author-github]
+ [npmjs/tunnckoCore][author-npmjs]
+ [more ...][contrib-more]


## License [![MIT license][license-img]][license-url]
Copyright (c) 2014-2015 [Charlike Mike Reagent][contrib-more], [contributors][contrib-graf].  
Released under the [`MIT`][license-url] license.


[npmjs-url]: http://npm.im/cleanup-coverage-code
[npmjs-img]: https://img.shields.io/npm/v/cleanup-coverage-code.svg?style=flat&label=cleanup-coverage-code

[coveralls-url]: https://coveralls.io/r/tunnckoCore/cleanup-coverage-code?branch=master
[coveralls-img]: https://img.shields.io/coveralls/tunnckoCore/cleanup-coverage-code.svg?style=flat

[license-url]: https://github.com/tunnckoCore/cleanup-coverage-code/blob/master/license.md
[license-img]: https://img.shields.io/badge/license-MIT-blue.svg?style=flat

[travis-url]: https://travis-ci.org/tunnckoCore/cleanup-coverage-code
[travis-img]: https://img.shields.io/travis/tunnckoCore/cleanup-coverage-code.svg?style=flat

[daviddm-url]: https://david-dm.org/tunnckoCore/cleanup-coverage-code
[daviddm-img]: https://img.shields.io/david/tunnckoCore/cleanup-coverage-code.svg?style=flat

[author-gratipay]: https://gratipay.com/tunnckoCore
[author-twitter]: https://twitter.com/tunnckoCore
[author-github]: https://github.com/tunnckoCore
[author-npmjs]: https://npmjs.org/~tunnckocore

[contrib-more]: http://j.mp/1stW47C
[contrib-graf]: https://github.com/tunnckoCore/cleanup-coverage-code/graphs/contributors

***

_Powered and automated by [kdf](https://github.com/tunnckoCore), February 4, 2015_

---
_Source: https://npm.io/package/cleanup-coverage-code · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
