<commit_before># Repositron

Simple unpacking of repositories to local directories.

```javascript
checkout({
    type: 'git',
    url: '<EMAIL>:bmeck/ruffian',
    destination: 'my-apps/ruffian'
}, function (err) {
    console.error(err)
});
```

```javascript
checkout({
    type: 'tar-stream',
    stream: req,
    destination: 'my-apps/ruffian'
}, function (err) {
    console.error(err)
});
```

```javascript
checkout({
    type: 'directory',
    directory: 'my-repos/ruffian',
    destination: 'my-apps/ruffian'
}, function (err) {
    console.error(err)
});
```<commit_msg>[docs]<commit_after># checkout

Simple unpacking of repositories to local directories.

## Git Repositories

```javascript
checkout({
    type: 'git',
    url: '<EMAIL>:bmeck/ruffian',
    destination: 'my-apps/ruffian'
}, function (err) {
    console.error(err)
});
```

## Streams from .tar files

```javascript
checkout({
    type: 'tar-stream',
    stream: req,
    destination: 'my-apps/ruffian'
}, function (err) {
    console.error(err)
});
```

## Local directories

```javascript
checkout({
    type: 'directory',
    directory: 'my-repos/ruffian',
    destination: 'my-apps/ruffian'
}, function (err) {
    console.error(err)
});
```

## Custom Handler

```javascript
checkout({
  type: function (description, callback) {
    // PERFORM THE CHECKOUT HERE
    // @description matches the first argument to checkout
  },
}, function (err) {
    console.error(err)
})
```

## Registering a generic handler

```javascript
checkout.handlers.myHandler = function (description, callback) {
  // Same as Custom Handler
}
```
{'fraction_non_alphanumeric': 0.1686372121966397, 'fraction_numerical': 0.0, 'mean_word_length': 3.8, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, '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': '4751888', 'n_tokens_mistral': 562, 'n_tokens_neox': 517, 'n_words': 127}