1.0.5 • Published 4 years ago

node-native-messaging-host v1.0.5

Weekly downloads
15
License
Unlicense
Repository
github
Last release
4 years ago

Simple Node Native Messaging Host

A native messaging host for Chrome and Firefox with a simple API and no dependencies.

Install

npm i node-native-messaging-host

Usage

import initNativeMessagingHost from 'node-native-messaging-host';

// Initialize
const nm = initNativeMessagingHost();

// Add a callback that will be fired each time a new message is
// received from the extension.
nm.addOnMessageListener(message => {
    console.log(`Received ${message} from extension`);
});


// Send a message to the extension
nm.send({ answer: 42 });

Used by

Todo

  • tests
1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago