<commit_before># babel-plugin-immutable-record [![Build Status](https://travis-ci.org/stephanos/babel-plugin-immutable-record.svg)](https://travis-ci.org/stephanos/babel-plugin-immutable-record) [![Coverage Status](https://coveralls.io/repos/stephanos/babel-plugin-immutable-record/badge.svg?branch=master&service=github)](https://coveralls.io/github/stephanos/babel-plugin-immutable-record?branch=master)


This plugin is acts as a *preprocessor*: it takes a mutable class
and generates a record with the following properties:

  - immutable
  - type-safe
  - `update()` to do partial updates
  - `toMap()` to export an untyped Map

It's based Facebook's
  [https://facebook.github.io/immutable-js/](immutable-js)
  and
  [http://flowtype.org/](Flow).


## Usage

If you run the plugin on the following input

```js
/* @flow */
<commit_msg>fix links<commit_after># babel-plugin-immutable-record [![Build Status](https://travis-ci.org/stephanos/babel-plugin-immutable-record.svg)](https://travis-ci.org/stephanos/babel-plugin-immutable-record) [![Coverage Status](https://coveralls.io/repos/stephanos/babel-plugin-immutable-record/badge.svg?branch=master&service=github)](https://coveralls.io/github/stephanos/babel-plugin-immutable-record?branch=master)


This plugin is acts as a *preprocessor*: it takes a mutable class
and generates a record with the following properties:

  - immutable
  - type-safe
  - `update()` to do partial updates
  - `toMap()` to export an untyped Map

It's based Facebook's
  [immutable-js](https://facebook.github.io/immutable-js/)
  and
  [Flow](http://flowtype.org/).


## Usage

If you run the plugin on the following input

```js
/* @flow */

{'fraction_non_alphanumeric': 0.1501787842669845, 'fraction_numerical': 0.0, 'mean_word_length': 4.634228187919463, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 10, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7069168', 'n_tokens_mistral': 573, 'n_tokens_neox': 554, 'n_words': 115}