<commit_before>## babel-plugin-transform-object-assign<commit_msg>Updates README.md with basic documentation<commit_after>## babel-plugin-transform-replace-object-assign

Replaces `Object.assign` with a custom implementation that you provide in plugin configuration. This plugin works similarly to the [babel-plugin-transform-object-assign](https://www.npmjs.com/package/babel-plugin-transform-object-assign) plugin except it allows you to provide your own implementation that you would like to replace `Object.assign` with rather than the `_extends` helper that Babel uses.

Also, this plugin will import an external package in files where `Object.assign` is used rather than redeclaring the function in each file (which should help reduce bundle size). This is ultimately what [babel-plugin-transform-runtime](https://www.npmjs.com/package/babel-plugin-transform-runtime) does for you when using the `_extends` helper.

The implementation you configure is specified as a npm package dependency.

### Usage

#### Installation

```sh
# Install the plugin
$ npm install babel-plugin-transform-replace-object-assign

# Install an assign implementation
$ npm install lodash.assign
```

#### Configure

When you provide the plugin, also specify which package you would like imported and used when replacing `Object.assign`.

**.babelrc**

```json
{
  "plugins": [
    ["transform-object-assign", "lodash.assign"]
  ] 
}
```

#### Result

**In**

```js
Object.assign(a, b);
```

**Out**

```js
import _lodash from 'lodash.assign';

_lodash(a, b)

```
{'fraction_non_alphanumeric': 0.11197411003236246, 'fraction_numerical': 0.0, 'mean_word_length': 4.992248062015504, 'pattern_counts': {'":': 1, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '1131336', 'n_tokens_mistral': 446, 'n_tokens_neox': 418, 'n_words': 157}