https://github.com/metamask/extension-port-stream
A module for creating a node style stream over a WebExtension port object.
https://github.com/metamask/extension-port-stream
Last synced: 7 months ago
JSON representation
A module for creating a node style stream over a WebExtension port object.
- Host: GitHub
- URL: https://github.com/metamask/extension-port-stream
- Owner: MetaMask
- License: isc
- Created: 2018-08-09T18:04:10.000Z (over 7 years ago)
- Default Branch: main
- Last Pushed: 2025-03-28T16:15:05.000Z (10 months ago)
- Last Synced: 2025-05-29T16:34:24.834Z (8 months ago)
- Language: TypeScript
- Size: 123 KB
- Stars: 25
- Watchers: 33
- Forks: 11
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# Extension Port Stream
A module for creating a Node-style stream over a WebExtension [Runtime.Port](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/runtime/Port) object.
## Usage
```javascript
import PortStream from 'extension-port-stream'
extension.runtime.onConnect.addListener(connectRemote)
const portStream = new PortStream(remotePort)
// Enjoy!
```
## Running tests
```bash
yarn test
```