1. simple-concat
Super-minimalist version of `concat-stream`. Less than 15 lines!
simple-concat
Package: simple-concat
Created by: feross
Last modified: Sun, 26 Jun 2022 19:33:45 GMT
Version: 1.0.1
License: MIT
Downloads: 35,648,067
Repository: https://github.com/feross/simple-concat

Install

npm install simple-concat
yarn add simple-concat

simple-concat travis npm downloads javascript style guide

Super-minimalist version of concat-stream. Less than 15 lines!

install

npm install simple-concat

usage

This example is longer than the implementation.

 var s = new stream.PassThrough()
concat(s, function (err, buf) {
  if (err) throw err
  console.error(buf)
})
s.write('abc')
setTimeout(function () {
  s.write('123')
}, 10)
setTimeout(function () {
  s.write('456')
}, 20)
setTimeout(function () {
  s.end('789')
}, 30)

license

MIT. Copyright (c) Feross Aboukhadijeh.

RELATED POST

10 Must-Know Windows Shortcuts That Will Save You Time

10 Must-Know Windows Shortcuts That Will Save You Time

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Navigating AWS Networking: Essential Hacks for Smooth Operation

Navigating AWS Networking: Essential Hacks for Smooth Operation

Achieving Stunning Visuals with Unity's Global Illumination

Achieving Stunning Visuals with Unity's Global Illumination

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code