Exciting news!Announcing our $4.6M Series Seed. Learn more
Socket
LoveBlogFAQ
Install
Log in

split-stream-lines-preserve-eol-pmb

Package Overview
Dependencies
3
Maintainers
1
Versions
2
Issues
File Explorer

Advanced tools

split-stream-lines-preserve-eol-pmb

Split a stream into lines that include their line terminator if they had one.

    0.1.1latest

Version published
Maintainers
1
Yearly downloads
6,353
increased by149.43%

Weekly downloads

Readme

Source

split-stream-lines-preserve-eol-pmb

Split a stream into lines that include their line terminator if they had one.

API

This module exports one function:

makeLineSplitter(opt)

Returns a duplex stream that splits the input by lines.

opt is an optional options object that supports these keys:

  • sep: RegExp for what you consider a line terminator. Default: /(\n)/
  • nEolGroups: The number of match groups in sep. Default: 1
  • discardRemainder: Boolean, whether to silently discard the last line if it was not properly terminated. Default: false

These experimental options are planned but do not work reliably yet:

  • throughOpt: Options to pass through to through2. Default: empty object.
  • obj: A shortcut for enabling objectMode in throughOpt. Boolean. Default: false
  • combine: A function that merges the line with the match group(s) of its terminator. It will be called with one argument, a flat array of all these parts. Can also be false to pass on said array, auto-enabling the obj option. Defaults to a function that can concat either buffers and strings.

Known issues

  • Needs more/better tests and docs.

 

License

ISC

Keywords

FAQs

What is split-stream-lines-preserve-eol-pmb?

Split a stream into lines that include their line terminator if they had one.

Is split-stream-lines-preserve-eol-pmb popular?

The npm package split-stream-lines-preserve-eol-pmb receives a total of 164 weekly downloads. As such, split-stream-lines-preserve-eol-pmb popularity was classified as not popular.

Is split-stream-lines-preserve-eol-pmb well maintained?

We found that split-stream-lines-preserve-eol-pmb demonstrated a not healthy version release cadence and project activity. It has 1 open source maintainer collaborating on the project.

Last updated on 04 Jul 2020
Socket

Product

Subscribe to our newsletter

Get open source security insights delivered straight into your inbox. Be the first to learn about new features and product updates.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc