<commit_before># jstransformer-reshape

[reshape](https://reshape.ml/) support for [JSTransformers](http://github.com/jstransformers).

[![Build Status](https://img.shields.io/travis/jstransformers/jstransformer-reshape/master.svg)](https://travis-ci.org/jstransformers/jstransformer-reshape)
[![Coverage Status](https://img.shields.io/codecov/c/github/jstransformers/jstransformer-reshape/master.svg)](https://codecov.io/gh/jstransformers/jstransformer-reshape)
[![Dependency Status](https://img.shields.io/david/jstransformers/jstransformer-reshape/master.svg)](http://david-dm.org/jstransformers/jstransformer-reshape)
[![NPM version](https://img.shields.io/npm/v/jstransformer-reshape.svg)](https://www.npmjs.org/package/jstransformer-reshape)

## Installation

    npm install jstransformer-reshape

> **Note:** Reshape requires node v6 or above.

## API

```js
var reshape = require('jstransformer')(require('jstransformer-reshape'));

var text = `
<my-component>
  <my-text class="text">Text</my-text>
</my-component>
`

// pass an array of plugins
var options = {
  plugins: [ "reshape-custom-elements" ]
}

reshape.renderAsync(text, options).then(function (result) {
  console.log(result.body)
})
//=> '<div class="my-component">\n<div class="text my-text">Text</div>\n</div>'

// or pass an object of plugins and settings
var options2 = {
  plugins: {
    "reshape-custom-elements": {
      "defaultTag": "span"
    }
  }
}

reshape.renderAsync(text, options2).then(function (result) {
  console.log(result.body)
})
//=> '<span class="my-component">\n<span class="text my-text">Text</span>\n</span>'
```

## License

MIT<commit_msg>readme update<commit_after># jstransformer-reshape

[reshape](https://reshape.ml/) support for [JSTransformers](http://github.com/jstransformers).

[![Build Status](https://img.shields.io/travis/jstransformers/jstransformer-reshape/master.svg)](https://travis-ci.org/jstransformers/jstransformer-reshape)
[![Coverage Status](https://img.shields.io/codecov/c/github/jstransformers/jstransformer-reshape/master.svg)](https://codecov.io/gh/jstransformers/jstransformer-reshape)
[![Dependency Status](https://img.shields.io/david/jstransformers/jstransformer-reshape/master.svg)](http://david-dm.org/jstransformers/jstransformer-reshape)
[![NPM version](https://img.shields.io/npm/v/jstransformer-reshape.svg)](https://www.npmjs.org/package/jstransformer-reshape)

## Installation

`npm install jstransformer-reshape`

> **Note:** Reshape requires node v6 or above.

## API

```js
const reshape = require('jstransformer')(require('jstransformer-reshape'))
const customElements = require('reshape-custom-elements')

const text = `
<my-component>
  <my-text class="text">Text</my-text>
</my-component>
`

// pass an array of plugins
const options = { plugins: [customElements()] }

reshape.renderAsync(text, options).then((result) => {
  console.log(result.body)
})
//=> '<div class="my-component">\n<div class="text my-text">Text</div>\n</div>'

// or pass an object of plugins and settings
const options2 = { plugins: [customElements({ defaultTag: 'span' })] }

reshape.renderAsync(text, options2).then(function (result) {
  console.log(result.body)
})
//=> '<span class="my-component">\n<span class="text my-text">Text</span>\n</span>'
```

## License

MIT
{'fraction_non_alphanumeric': 0.18543247344461306, 'fraction_numerical': 0.0018209408194233688, 'mean_word_length': 5.42495126705653, 'pattern_counts': {'":': 2, '<': 27, '<?xml version=': 0, '>': 34, 'https://': 16, 'lorem ipsum': 0, 'www.': 2, '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': '7600236', 'n_tokens_mistral': 1208, 'n_tokens_neox': 1177, 'n_words': 156}