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

carrier

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

carrier - npm Package Compare versions

Comparing version 0.1.6 to 0.1.7

.npmignore

16

lib/carrier.js
var util = require('util'),
events = require('events');
function Carrier(reader, listener, encoding) {
function Carrier(reader, listener, encoding, separator) {
var self = this;

@@ -9,2 +9,6 @@

if (!separator) {
separator = /\r?\n/;
}
if (listener) {

@@ -16,9 +20,8 @@ self.addListener('line', listener);

reader.setEncoding(encoding || 'utf-8');
reader.setEncoding(encoding || 'utf8');
reader.on('data', function(data) {
var lines = (buffer + data).split("\n");
var lines = (buffer + data).split(separator);
buffer = lines.pop();
lines.forEach(function(line, index) {
line = line.replace("\r", '');
self.emit('line', line);

@@ -30,3 +33,2 @@ });

if (buffer.length > 0) {
buffer = buffer.replace("\r", '');
self.emit('line', buffer);

@@ -43,5 +45,5 @@ buffer = '';

exports.carry = function(reader, listener, encoding) {
return new Carrier(reader, listener, encoding);
exports.carry = function(reader, listener, encoding, separator) {
return new Carrier(reader, listener, encoding, separator);
}
{ "name" : "carrier"
, "description" : "Evented stream line reader for node.js"
, "version" : "0.1.6"
, "version" : "0.1.7"
, "homepage" : "http://github.com/pgte/carrier"

@@ -20,2 +20,6 @@ , "author" :

}
, {
"name": "Patrick Georgi"
, "url": "https://github.com/pgeorgi"
}
]

@@ -22,0 +26,0 @@ , "repository" :

Sorry, the diff of this file is not supported yet

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