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

linerstream

Package Overview
Dependencies
Maintainers
2
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.1.4 to 0.2.0

9

index.js

@@ -6,3 +6,10 @@ var Transform = require('stream').Transform

function Liner(opts) {
//set a default EOL per instance so it can change
this.EOL = os.EOL
opts = opts || {}
//accept EOL as an option instead of forcing the OS reported EOL
if(opts.EOL){
this.EOL = opts.EOL
delete opts.EOL
}
opts.objectMode = true

@@ -18,3 +25,3 @@ Transform.call(this, opts)

}
var lines = data.split(os.EOL)
var lines = data.split(this.EOL)
this._lastLineData = lines.splice(lines.length - 1, 1)[0]

@@ -21,0 +28,0 @@

2

package.json
{
"name": "linerstream",
"version": "0.1.4",
"version": "0.2.0",
"description": "Split a readable stream by newline characters",

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

@@ -36,2 +36,10 @@ # linerstream

## Override EOL
If you don't want to use the OS default `EOL` character, you can ovverride it when creating the stream
```
var stream2 = new LinerStream({EOL: '\n'})
//force windows EOL
var stream3 = new LinerStream({EOL: '\r\n'})
```
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