<commit_before>= sandboxed-module-blanket

Provides a [sandboxed-module](https://github.com/felixge/node-sandboxed-module) compatible source transformer to add [blanket.js](https://github.com/alex-seville/blanket) code coverage instrumentation.

The typical use case is to provide code coverage metrics when unit testing a module you are mocking/stubbing the dependencies of.

Although sandboxed-module is the mocking library of choice, the _promise_ glue provided by sandboxed-module-blanket could be used with any library that requires synchronous source code modification.

== Install

	npm install sandboxed-module-blanket

== Usage

```javascript
require('blanket')({
  pattern: 'module-under-test'
});
var SandboxedModule = require('sandboxed-module');
var SandboxedModuleBlanket = require('sandboxed-module-blanket');

var moduleUnderTest = SandboxedModule.require('module-under-test', {
  sourceTransformers: SandboxedModuleBlanket,
  requires: {
    'dependency-of-module-under-test': { /* stub */ }
  }
});
```

== Testing

	npm test

== Licence

Copyright (c) 2014 Net-A-Porter<commit_msg>Correct markdown<commit_after># sandboxed-module-blanket

Provides a [sandboxed-module](https://github.com/felixge/node-sandboxed-module) compatible source transformer to add [blanket.js](https://github.com/alex-seville/blanket) code coverage instrumentation.

The typical use case is to provide code coverage metrics when unit testing a module you are mocking/stubbing the dependencies of.

Although sandboxed-module is the mocking library of choice, the _promise_ glue provided by sandboxed-module-blanket could be used with any library that requires synchronous source code modification.

## Install

	npm install sandboxed-module-blanket

## Usage

```javascript
require('blanket')({
  pattern: 'module-under-test'
});

var SandboxedModule = require('sandboxed-module');
var SandboxedModuleBlanket = require('sandboxed-module-blanket');

var moduleUnderTest = SandboxedModule.require('module-under-test', {
  sourceTransformers: SandboxedModuleBlanket,
  requires: {
    'dependency-of-module-under-test': { /* stub */ }
  }
});
```

## Testing

	npm test

## Licence

Copyright (c) 2014 Net-A-Porter
{'fraction_non_alphanumeric': 0.10707803992740472, 'fraction_numerical': 0.003629764065335753, 'mean_word_length': 5.211267605633803, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6658430', 'n_tokens_mistral': 690, 'n_tokens_neox': 644, 'n_words': 184}