<commit_before>
Message Standardization:
=======================

* `{ ok : true, ... }`
* `{ err: true, err_server|err_user: true, msg: "string", ... }`

Browsers:
========================

```html
  <script src="/bower_components/dum_dum_boom_boom/build/browser.js"></script>

  <!-- on load -->
  <script>
    App('send message', {'dom-change': true});
  </script>
```

*NOTE*: The `browser.js` build contains all the require libs: `lodash`, `jquery`, etc.

`dum_dum_boom_boom` works by sending messages (ie objects) to a `server` like object: `App`:

```javascript
   App("send message", {"dom-change": true});
   App("send message", {"name": "<NAME>"});
```

This `server` like object holds state.
It has nothing to do with a web server. It merely holds state
that needs to be accessed by various functions.
Later, counters and other Redis-like functionality will
be added.

To add functionality, create a function to be executed:

```javascript
  App("create message function", function (msg) {
   if (!msg_match({"dom-change": true}, msg)
       return;
  });
```

Each message function gets run on every message. You can stop
execution of the function with an `if` and `return` on the messages you
do not want to process.  The function, `msg_match`, is provided to
let you compare the messages using an object that "looks like" the message
you want to process.


data-do is the only pre-installed message function:
============================

[Source code for data-do](https://github.com/da99/dum_dum_boom_boom/blob/master/lib/browser/data-do/_.bottom.js).

This is the only message processing function. It is actually named `process_data_dos` inside
the App object.  You associate DOM elements with the `data-do` attribute:

```html
  <div data-do="my_func with args;  my_other_func with other args; simply_my_func">Test</div>
```

You can associate multiple functions by separating them with `;`. The "arguments" will be
split on whitespace and pass to the function inside the message (ie object). For example:<commit_msg>Dev. checkpoint: Touchups.<commit_after>
Message Standardization:
=======================

* `{ ok : true, ... }`
* `{ err: true, err_server|err_user: true, msg: "string", ... }`

Browsers:
========================

```html
  <script src="/bower_components/dum_dum_boom_boom/build/browser.js"></script>

  <!-- on load -->
  <script>
    App('send message', {'dom-change': true});
  </script>
```

*NOTE*: The `browser.js` build contains all the require libs: `lodash`, `jquery`, etc.

`dum_dum_boom_boom` works by sending messages (ie objects) to a `server` like object: `App`:

```javascript
   App("send message", {"dom-change": true});
   App("send message", {"name": "<NAME>"});
```

This `server` like object holds state.
It has nothing to do with a web server. It merely holds state
that needs to be accessed by various functions.
Later, counters and other Redis-like functionality will
be added.

To add functionality, create a function to be executed:

```javascript
  App("create message function", function (msg) {
   if (!msg_match({"dom-change": true}, msg)
       return;
  });
```

Each message function gets run on every message. You can stop
execution of the function with an `if` and `return` on the messages you
do not want to process.  The function, `msg_match`, is provided to
let you compare the messages using an object that "looks like" the message
you want to process.


data-do is the only pre-installed message function:
============================
It is actually named `process_data_dos` inside
the App object:
[source code](https://github.com/da99/dum_dum_boom_boom/blob/master/lib/browser/data-do/_.bottom.js).

You associate DOM elements with the `data-do` attribute:

```html
  <div data-do="my_func with args;  my_other_func with other args; simply_my_func">Test</div>
```

You can associate multiple functions by separating them with `;`. The "arguments" will be
split on whitespace and pass to the function inside the message (ie object). For example:
{'fraction_non_alphanumeric': 0.15792091519522508, 'fraction_numerical': 0.000994777418552599, 'mean_word_length': 4.547586206896551, 'pattern_counts': {'":': 6, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 2, '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': '6837473', 'n_tokens_mistral': 1224, 'n_tokens_neox': 1176, 'n_words': 468}