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

linerstream

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

linerstream - npm Package Compare versions

Comparing version 0.0.6 to 0.1.0

11

index.js
var Transform = require('stream').Transform
var util = require('util')
function Liner() {
var opts = {
objectMode: true
}
function Liner(opts) {
opts = opts || {}
opts.objectMode = true
Transform.call(this, opts)

@@ -12,3 +11,3 @@ }

util.inherits(Liner, Transform)
Liner.prototype._transform = function(chunk, encoding, done) {
Liner.prototype._transform = function transform(chunk, encoding, done) {
var data = chunk.toString()

@@ -25,3 +24,3 @@ if (this._lastLineData) {

Liner.prototype_flush = function(done) {
Liner.prototype_flush = function flush(done) {
if (this._lastLineData) {

@@ -28,0 +27,0 @@ this.push(this._lastLineData)

{
"name": "linerstream",
"version": "0.0.6",
"version": "0.1.0",
"description": "Split a readable stream by newline characters",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -23,3 +23,6 @@ # linerstream

// splitter is an instance of require('stream').Transform
var splitter = new Linestream()
var opts = {
highWaterMark: 2
}
var splitter = new Linestream(opts) // opts is optional

@@ -26,0 +29,0 @@ var readStream = fs.createReadStream('/file/with/line/breaks.txt')

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