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

parser-delimiter

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

parser-delimiter - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

README.md

15

delimiter.js
'use strict'
const Buffer = require('safe-buffer').Buffer
const Transform = require('stream').Transform
/**
* A transform stream that emits data each time a byte sequence is received.
* @extends Transform
* @summary To use the `Delimiter` parser, provide a delimiter as a string, buffer, or array of bytes. Runs in O(n) time.
* @example
// To use the `Delimiter` parser, provide a delimiter as a string, buffer, or array of bytes:
const SerialPort = require('serialport');
const Delimiter = SerialPort.parsers.Delimiter;
const port = new SerialPort('/dev/tty-usbserial1');
const parser = port.pipe(new Delimiter({ delimiter: '\n' }));
parser.on('data', console.log);
const SerialPort = require('serialport')
const Delimiter = require('parser-delimiter')
const port = new SerialPort('/dev/tty-usbserial1')
const parser = port.pipe(new Delimiter({ delimiter: '\n' }))
parser.on('data', console.log)
*/

@@ -49,4 +50,4 @@ class DelimiterParser extends Transform {

}
};
}
module.exports = DelimiterParser
{
"name": "parser-delimiter",
"main": "delimiter.js",
"version": "1.0.1",
"version": "1.0.2",
"dependencies": {

@@ -6,0 +6,0 @@ "safe-buffer": "^5.1.1"

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