@serialport/parser-delimiter
Advanced tools
Comparing version 10.2.2 to 10.3.0
/// <reference types="node" /> | ||
import { Transform, TransformCallback, TransformOptions } from 'stream'; | ||
export interface DelimiterOptions extends TransformOptions { | ||
/** The delimiter on which to split incoming data. */ | ||
delimiter: string | Buffer | number[]; | ||
/** Should the delimiter be included at the end of data. Defaults to `false` */ | ||
includeDelimiter?: boolean; | ||
delimiter: string | Buffer | number[]; | ||
} | ||
@@ -12,8 +14,2 @@ /** | ||
* To use the `Delimiter` parser, provide a delimiter as a string, buffer, or array of bytes. Runs in O(n) time. | ||
* @example | ||
const SerialPort = require('serialport') | ||
const {DelimiterParser} = require('@serialport/parser-delimiter') | ||
const port = new SerialPort('/dev/tty-usbserial1') | ||
const parser = port.pipe(new DelimiterParser({ delimiter: '\n' })) | ||
parser.on('data', console.log) | ||
*/ | ||
@@ -20,0 +16,0 @@ export declare class DelimiterParser extends Transform { |
@@ -10,8 +10,2 @@ "use strict"; | ||
* To use the `Delimiter` parser, provide a delimiter as a string, buffer, or array of bytes. Runs in O(n) time. | ||
* @example | ||
const SerialPort = require('serialport') | ||
const {DelimiterParser} = require('@serialport/parser-delimiter') | ||
const port = new SerialPort('/dev/tty-usbserial1') | ||
const parser = port.pipe(new DelimiterParser({ delimiter: '\n' })) | ||
parser.on('data', console.log) | ||
*/ | ||
@@ -18,0 +12,0 @@ class DelimiterParser extends stream_1.Transform { |
@@ -5,3 +5,3 @@ { | ||
"types": "./dist/index.d.ts", | ||
"version": "10.2.2", | ||
"version": "10.3.0", | ||
"engines": { | ||
@@ -25,3 +25,3 @@ "node": ">=12.0.0" | ||
}, | ||
"gitHead": "e8be807d39ad084ffc7e8609693da5a94cf8a9cb" | ||
"gitHead": "ceba41c8f89d911de210f2513aaae85fff3ab457" | ||
} |
@@ -0,1 +1,3 @@ | ||
# @serialport/parser-delimiter | ||
See our api docs https://serialport.io/docs/api-parser-delimiter |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4
4202
62