3.10.113 • Published 11 months ago

@devtea2026/temporibus-totam-a-accusantium v3.10.113

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

@devtea2026/temporibus-totam-a-accusantium

@devtea2026/temporibus-totam-a-accusantium is a small node module that pipes streams together and destroys all of them if one of them closes.

npm install @devtea2026/temporibus-totam-a-accusantium

build status

What problem does it solve?

When using standard source.pipe(dest) source will not be destroyed if dest emits close or an error. You are also not able to provide a callback to tell when then pipe has finished.

@devtea2026/temporibus-totam-a-accusantium does these two things for you

Usage

Simply pass the streams you want to pipe together to @devtea2026/temporibus-totam-a-accusantium and add an optional callback

var @devtea2026/temporibus-totam-a-accusantium = require('@devtea2026/temporibus-totam-a-accusantium')
var fs = require('fs')

var source = fs.createReadStream('/dev/random')
var dest = fs.createWriteStream('/dev/null')

@devtea2026/temporibus-totam-a-accusantium(source, dest, function(err) {
  console.log('pipe finished', err)
})

setTimeout(function() {
  dest.destroy() // when dest is closed @devtea2026/temporibus-totam-a-accusantium will destroy source
}, 1000)

You can use @devtea2026/temporibus-totam-a-accusantium to pipe more than two streams together as well

var transform = someTransformStream()

@devtea2026/temporibus-totam-a-accusantium(source, transform, anotherTransform, dest, function(err) {
  console.log('pipe finished', err)
})

If source, transform, anotherTransform or dest closes all of them will be destroyed.

Similarly to stream.pipe(), @devtea2026/temporibus-totam-a-accusantium() returns the last stream passed in, so you can do:

return @devtea2026/temporibus-totam-a-accusantium(s1, s2) // returns s2

Note that @devtea2026/temporibus-totam-a-accusantium attaches error handlers to the streams to do internal error handling, so if s2 emits an error in the above scenario, it will not trigger a proccess.on('uncaughtException') if you do not listen for it.

If you want to return a stream that combines both s1 and s2 to a single stream use @devtea2026/temporibus-totam-a-accusantiumify instead.

License

MIT

Related

@devtea2026/temporibus-totam-a-accusantium is part of the mississippi stream utility collection which includes more useful stream modules similar to this one.

For enterprise

Available as part of the Tidelift Subscription.

The maintainers of @devtea2026/temporibus-totam-a-accusantium and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. Learn more.

columnsweakmaplintconsumehardlinkses2018Symbolspeedaccessorlessrmdirutilitycloudtrailcore-jsfast-deep-clonegroupredux-toolkittc39exit-codeclassnameUint32ArrayES6less cssBigUint64ArraywindowsconcatsameValueZerovaluesframeworkvisualdropdependenciesdeep-clonehelperspostcssarraybufferRxJStestwrapinferencefastelmrdssortebsjsArray.prototype.flattenlogless compilerjestES2016domauthassertsemrexecutablea11ydiffvariableswritablecoercibledeepcopysqsenumerableuuidglobalsgenericscomparebrowserlistsequencereact-testing-librarycjk[[Prototype]]Object.fromEntriestimees-abstractchinesecompilernested cssdebugchannelArrayBuffer#slicecode pointsqueueMicrotaskURLSearchParamsguidsymbolsetImmediatergbtypeerrorquerystringcorsairbnbcss lesstelephonefolderkeytapidlezodruntimefast-clonereadableECMAScript 3rmconcatMapBigInt64Arrayes6descriptionieescapeglobalcensorsyntaxerrorfileprotobufwalkingwalklimitoutputhasOwnPropertybcryptclonebusyrangeerrorintrinsicequalityautoprefixerYAMLdefaultPromiseunicodejsdomfile systemmakeES2023chaicss-in-jsstyled-componentsbreakcollectiontypeofargumentECMAScript 2021safecontainstestersyntaxWebSocketmixinscolorexpressionecmascriptl10nArray.prototype.includesprototypewordwrapeslintvarsdireventEmitterprotourlentriesremoveenvironmentsbuffersparsinginstallerpropertiesemitenvironmentcolourIteratorutil.inspectlastfluxtapeendpointshebangphonemetadatawaitcloudsearchvalidpromisesstarterttyoperating-systemES3idbannerStreamSymbol.toStringTagArray.prototype.flatcss variableworkflowsignaldeterministiceast-asian-widthsymlinkrobustregexploadbalancingarktypereplaystyleredactshrinkwraphttpgetOwnPropertyDescriptorInt16Arrayes-shim APIECMAScript 2023includesSetliveinspectmatchAllhas-ownargparseMapfindLastIndexcomputed-typesgetPrototypeOfWeakMapfast-copyserializerperformanceES8TypeBoxoffsetreadkeysObject.definePropertymimelimitedserializationwordbreakless mixinsArray.prototype.filterrm -frkarmacommanderfindjsonargsrandombundlersigtermnumberrecursivecloudformationtrimEndcryptreact-hooksInt8ArraystatusimmerpreprocessortouchsortedsignalsassignfinduptrimLeftpnpm9namerapidclassesshimfullbrowseres-shimstslibfscss nestingoncelazyESECMAScript 2022regular expressionscreatezeroES2019PushclassnamesshamparenterrorgetUint16ArraytypesafeavafetchbyteLengthbootstrap lessextendes2015nodejsworkspace:*characterArray.prototype.findLastlockfilemimetypesagentpackage.jsonobjwhichcodesterminalarraydeep-copypackage managerbrowserslistvalidationes5libphonenumberECMAScript 2017clidataviewreadablestreamES2018dom-testing-libraryxdgreusesetterestreestyleguidepathequalapisinatratrimStarttoolkitStreamsinternal slottyped arrayflathasnpmsigintlinkquoteFunction.prototype.nameroutervestregular expressionreduceautoscalingsidesuperagentWebSocketsAsyncIteratorreduxWeakSetloggingidentifiersextraformattinggradients cssObjecttoArrayinterruptsindicatorFloat32ArrayArrayBuffer.prototype.slicetraverselookfseventsStyleSheetmochaString.prototype.matchAllproxytermexitqselasticacheeverylengthloggercryptooptimizerECMAScript 6stringifyfilterwatchcloudwatchutileslint-pluginbyteOffsetHyBiprefixjsdiffjavascriptchromegetoptmulti-packagebound256ESnextfullwidthinstallimmutablebatches2016fast-deep-copyes7-0groupByslotmkdirio-tsmrujsxtypedarraygdprargvReactiveXrfc4122tsmaprestfulmoduleenderlanguagedynamodbcolumncollection.es6queryawaitspinnersschemaflatMaprestmatchesloadingstringconfigurablepredictableparserArrayBuffercmdmiddlewareawswritesetduplexcallboundobjectmodulesstatemonorepoassertflagsencryptionglobprotocol-buffersjasmineECMAScript 2015lesscssoptioncurlspawnweaksetopenertoStringTagprettyECMAScript 2019mkdirsoptimistMicrosoftsnswarningtypanioninvariantsymlinksfindLastcall-bindprivateECMAScript 5envdatastructureinternalpackageserializefastifytypecachestreamshelljapanesecommand-linedateArray.prototype.flatMaplook-up0statelesserror-handlingtypedUint8ClampedArrayimportwafreal-timeES7eventssespasswordownfunctionalomitemojipreserve-symlinksprocessString.prototype.trimregularwatchFilerateponyfillespostcss-pluginbeanstalkdeeplruhandlershigher-orderstyleslistenersargumentstrimspectakeflattenjshintlinewrapiteratestringifierparseCSSStyleDeclarationpositivecallbindajvRegExp#flagsES2017requirevpcperformantcorepropxdg-opentoobjectthrottlecalldefinebyteforEachstructuredCloneexecharacterspluginthroatdeepclonetostringtagpolyfillminimalpersistentformspicomatch.envhotReactiveExtensionsstylingtoolsdescriptorec2scheme-validationstabledeletees2017namesresolveTypeScriptsuperstructexpresstrimRightbdddayjstoSortedsettingstaskisgradients css3pipeObject.valuesdataViewsetPrototypeOfmime-dbrm -rf_.extendimportexportObject.isisConcatSpreadableregexfastcopycloudfrontsharedarraybufferfixed-widthECMAScript 7variables in csssearchcopypackagesformcommandauthenticationnodecallbackpatchbluebirdupcall-boundUnderscoretypedarraysuninstallfromsimpledbstoragegatewaysymbolsextensionfunctioneditoropenasyncreducermerge$.extendarrayss3nopecheckappbundlingamazonopensbindswfastmacosmoveObject.assignArray.prototype.containswebES2020definePropertyglacierxtermRxJSONpropertyjsonpathxhrvalidateexecES2015JSON-SchemaRegExp.prototype.flagswidthvaluecolorsclass-validatorformathasOwnfull-widthfunctionsES2022testingstreamsmomentprogressratelimiteventDispatcherqueueyupconsolewatchingeslintconfigchildwebsiteajaxdatafastclonespinnerelectronUint8ArraytypescriptbufferInt32ArrayflagTypedArraywatcherawesomesauceurlsefficientObject.getPrototypeOfmatchnegativees8Observablefpsdebuggermkdirpform-validationkoreantypesstreams2requestmake dirconfigpyyamlArray.prototype.findLastIndexECMAScript 2016Float64Arrayeslintplugini18narthookformjwtstarthashwhatwglaunchpruneURLArrayReflect.getPrototypeOfchromiumbootstrap cssworkerless.jsjoiwgetnativeroute53negative zerotextcss__proto__mapreducefind-uptddscheme@@toStringTagiamconnectaccessibilityutilitiesirqRFC-6455jQueryfigletelbsomeansicircularparentsviewdotenvcompile lessiteratorgetintrinsicCSSkinesislinuxhooksgetteriterationassertiondescriptorsinputreactyamlreact-hook-formprivate datahttpsstylesheetinECMAScript 2018ES5concurrencyECMAScript 2020slicemobileES2021
3.9.112

11 months ago

3.9.110

11 months ago

3.9.111

11 months ago

3.9.109

11 months ago

3.9.108

11 months ago

3.10.113

11 months ago

3.10.112

11 months ago

3.9.107

11 months ago

1.5.70

1 year ago

1.5.72

1 year ago

1.5.71

1 year ago

1.5.74

1 year ago

1.5.73

1 year ago

1.5.76

1 year ago

1.5.75

1 year ago

1.5.78

1 year ago

1.5.77

1 year ago

1.5.79

1 year ago

1.4.29

1 year ago

3.9.101

11 months ago

3.9.102

11 months ago

3.9.100

11 months ago

3.9.105

11 months ago

3.9.106

11 months ago

3.9.103

11 months ago

3.9.104

11 months ago

1.4.30

1 year ago

3.8.94

12 months ago

3.8.95

12 months ago

3.8.92

12 months ago

3.8.93

12 months ago

3.8.90

12 months ago

3.8.91

12 months ago

1.5.50

1 year ago

1.5.52

1 year ago

1.5.51

1 year ago

1.5.54

1 year ago

1.5.53

1 year ago

1.7.79

1 year ago

1.5.56

1 year ago

1.5.55

1 year ago

1.5.58

1 year ago

2.7.87

12 months ago

1.5.57

1 year ago

1.5.59

1 year ago

1.7.80

1 year ago

1.7.81

1 year ago

1.7.82

12 months ago

1.7.83

12 months ago

1.7.84

12 months ago

1.5.61

1 year ago

1.7.85

12 months ago

1.5.60

1 year ago

1.7.86

12 months ago

1.5.63

1 year ago

1.7.87

12 months ago

1.5.62

1 year ago

1.5.65

1 year ago

1.5.64

1 year ago

1.5.67

1 year ago

1.5.66

1 year ago

1.5.69

1 year ago

1.5.68

1 year ago

1.1.20

1 year ago

3.9.99

11 months ago

1.5.30

1 year ago

1.5.32

1 year ago

1.5.31

1 year ago

1.5.34

1 year ago

1.5.33

1 year ago

3.9.97

12 months ago

1.5.36

1 year ago

3.9.98

11 months ago

1.5.35

1 year ago

3.9.95

12 months ago

1.5.38

1 year ago

3.9.96

12 months ago

1.5.37

1 year ago

1.5.39

1 year ago

1.5.41

1 year ago

1.5.40

1 year ago

1.5.43

1 year ago

1.5.42

1 year ago

1.5.45

1 year ago

1.5.44

1 year ago

2.8.89

12 months ago

1.5.47

1 year ago

2.8.88

12 months ago

1.5.46

1 year ago

1.3.25

1 year ago

2.8.87

12 months ago

1.5.49

1 year ago

1.5.48

1 year ago

1.3.28

1 year ago

1.3.29

1 year ago

1.3.26

1 year ago

1.3.27

1 year ago

2.8.90

12 months ago

1.2.20

1 year ago

1.2.23

1 year ago

1.2.24

1 year ago

1.2.21

1 year ago

1.2.22

1 year ago

1.2.25

1 year ago

1.6.79

1 year ago

1.1.19

1 year ago

1.1.18

1 year ago

1.1.17

1 year ago

1.1.16

1 year ago

1.1.15

1 year ago

1.1.14

1 year ago

1.1.13

1 year ago

1.1.12

1 year ago

1.1.11

1 year ago

1.1.10

1 year ago

1.1.9

1 year ago

1.1.8

1 year ago

1.1.7

1 year ago

1.1.6

1 year ago

1.1.5

1 year ago

1.1.4

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago