<commit_before># electron-notification-shim [![Build Status](https://travis-ci.org/seriema/electron-notification-shim.svg?branch=master)](https://travis-ci.org/seriema/electron-notification-shim)

> Get Notification API events in Electron main-process. Perfect for adding Notification toasters in Windows with node-notifier or other solution.

## Usage

Include it in your rendering-view like this:

    require('electron-notification-shim')();

That's all. Now you'll receive `notification-shim` events in your main-process, like this:

    ipcMain.on('notification-shim', (e, msg) => { ... });

The `msg` is a simple object: `{ title, options }`, which matches the two parameters sent to [new Notification(title, options)](https://developer.mozilla.org/en-US/docs/Web/API/Notification/Notification). You can send an event back with [e.returnValue](http://electron.atom.io/docs/v0.37.8/api/ipc-main/#eventreturnvalue) or [e.sender.send()](http://electron.atom.io/docs/v0.37.8/api/ipc-main/#eventsender) if you want to react to it in the rendering view as well.<commit_msg>Add npm install instructions<commit_after># electron-notification-shim [![Build Status](https://travis-ci.org/seriema/electron-notification-shim.svg?branch=master)](https://travis-ci.org/seriema/electron-notification-shim)

> Get Notification API events in Electron main-process. Perfect for adding Notification toasters in Windows with node-notifier or other solution.

## Install

```
$ npm install --save electron-notification-shim
```

## Usage

Include it in your rendering-view like this:

    require('electron-notification-shim')();

That's all. Now you'll receive `notification-shim` events in your main-process, like this:

    ipcMain.on('notification-shim', (e, msg) => { ... });

The `msg` is a simple object: `{ title, options }`, which matches the two parameters sent to [new Notification(title, options)](https://developer.mozilla.org/en-US/docs/Web/API/Notification/Notification). You can send an event back with [e.returnValue](http://electron.atom.io/docs/v0.37.8/api/ipc-main/#eventreturnvalue) or [e.sender.send()](http://electron.atom.io/docs/v0.37.8/api/ipc-main/#eventsender) if you want to react to it in the rendering view as well.
{'fraction_non_alphanumeric': 0.142152466367713, 'fraction_numerical': 0.007174887892376682, 'mean_word_length': 4.764857881136951, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 6, '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': '3644520', 'n_tokens_mistral': 704, 'n_tokens_neox': 663, 'n_words': 183}