Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bsplit

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bsplit - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

.npmignore

1

index.js

@@ -28,3 +28,2 @@ /**

}
//this.flush();
}

@@ -31,0 +30,0 @@

{
"name": "bsplit",
"version": "1.0.0",
"version": "1.0.1",
"description": "A dependency-less binary stream splitter",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"test": "mocha tests"
},

@@ -24,3 +24,7 @@ "repository": {

},
"homepage": "https://github.com/kalm/bsplit#readme"
"homepage": "https://github.com/kalm/bsplit#readme",
"devDependencies": {
"chai": "^3.5.0",
"mocha": "^3.1.0"
}
}
# bsplit
A light, dependency-less stream splitter for kalm transports.
[![bsplit](https://img.shields.io/npm/v/bsplit.svg)](https://www.npmjs.com/package/bsplit)
[![Build Status](https://travis-ci.org/kalm/bsplit.svg?branch=master)](https://travis-ci.org/kalm/bsplit)
[![Dependencies Status](https://david-dm.org/kalm/bsplit.svg)](https://www.npmjs.com/package/bsplit)
---
## What
A light, dependency-less binary stream splitter for kalm transports.
It acts like a stream, emitting 'data' events, and implementing 'write' and 'end' functions while splitting payloads by a given character or `\n` by default.
Output is a UINT8 array (easier for internal deserialization).
Output is a UINT8 array (easier for internal deserialization).
## Usage
```node
const bsplit = require('bsplit');
const socket = net.connect(...);
const stream = socket.pipe(bsplit());
stream.on('data', (data) => console.log(String.fromCharCode.apply(null, data)));
```
Where `bsplit()` can take an argument <UINT8> corresponding to the byte to split on.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc