2.2.18 • Published 30 days ago

@devtea2026/optio-harum-deserunt-distinctio v2.2.18

Weekly downloads
-
License
MIT
Repository
github
Last release
30 days ago

@devtea2026/optio-harum-deserunt-distinctio Version Badge

Note: This package is a fork of https://npmjs.com/through, and builds off of it.

github actions coverage License Downloads

npm badge

Easy way to create a Stream that is both readable and writable.

  • Pass in optional write and end methods.
  • through takes care of pause/resume logic if you use this.queue(data) instead of this.emit('data', data).
  • Use this.pause() and this.resume() to manage flow.
  • Check this.paused to see current flow state. (write always returns !this.paused).

This function is the basis for most of the synchronous streams in event-stream.

var through = require('@devtea2026/optio-harum-deserunt-distinctio')

through(function write(data) {
    this.queue(data) //data *must* not be null
  },
  function end () { //optional
    this.queue(null)
  })

Or, can also be used without buffering on pause, use this.emit('data', data), and this.emit('end')

var through = require('@devtea2026/optio-harum-deserunt-distinctio')

through(function write(data) {
    this.emit('data', data)
    //this.pause()
  },
  function end () { //optional
    this.emit('end')
  })

Extended Options

You will probably not need these 99% of the time.

autoDestroy=false

By default, through emits close when the writable and readable side of the stream has ended. If that is not desired, set autoDestroy=false.

var through = require('@devtea2026/optio-harum-deserunt-distinctio')

//like this
var ts = through(write, end, {autoDestroy: false})
//or like this
var ts = through(write, end)
ts.autoDestroy = false
collectionbyteOffsetObservablecomparepreprocessortoolkitstylesheetcolourdescriptorssqsutil.inspectvaliditeratorassertioneslint-pluginWebSocketsenderpositiveIteratorvaluesSymbolmapreduceES7accessorlook-upagenttakeartschemeregexmkdirsminimaldynamodbcommanderclassnamessetImmediatefunctionalenvhas-ownlanguageTypedArrayrdssigtermArray.prototype.findLastIndexassertsreusequeuehasOwnsortedpackagesunicodeyupiefast-copyequalityecmascriptidentifiersvisualnativespinnermakecolumntypeECMAScript 6jsES8warningspeedcjkcopyjshintmapconfigxdg-openObject.assigndefinePropertyObservablesInt16Arrayrandomcss nestingperformancewidthURLSearchParamsreacthttpsbyteLengthESnextsearchnodepropertiescharacterquerystringchromecurlsafesharedarraybufferlessownmonorepophonekeysmacosfstapemkdirstreamflatMapcharacterstouchfseventsES2020emitpipebundlingjoiparentsregularclonehardlinksdateebsfindxdgObject.valueswatchreststyled-componentsUnderscorecensorchanneli18ncode pointscloudtrailES2015flagsreal-timefindLastIndextc39intrinsicprototypecss-in-jsdeep-copy__proto__electronCSSStyleSheetReflect.getPrototypeOfnpmPromisehandlersES2018opennumberinspectgroupBychaiparsedebuggerrecursivewrapimporttrimEndes-shim APIidvalidationconcatMapObject.definePropertyreact-hooksTypeScriptinstallspecparentappglacierfastclonedeepclonepyyamlrangeerrormkdirpWeakMapformsignalsarraybufferdroprfc4122lintloggerkarmatddmoduleschildelasticachepatchYAMLString.prototype.matchAllinstallerstringifycall-boundpredictableefficientfastcopyArrayBuffer.prototype.slicebuffersetterwatchingastes6redux-toolkitstreams2stableexpressreplayelbMapjQueryfastifytoSortedes2018Rxs3apicss variablecacheswfECMAScript 2020flagstylesarraysautoprefixeruuidfilterfast-cloneirqtaskstoragegatewaydefineECMAScript 2015upscheme-validationlimitedES2021ES6$.extendviewvestio-tsshamObject.getPrototypeOfrgbperformantpnpm9invariantbannereskoreanlockfilewafutilless compilerstringclassnamematchAllfast-deep-clonegdprpreserve-symlinksmochamixinsclassespackage_.extendrmdirinternalMicrosoftreadablestreamfoldersetinternal slotjsxurlestreecommandentriescliES2016websitepruneassigndatatoArrayserializerreducereduxlastformatObject.entrieslrupromisesstarterfullwidthsequencesliceHyBixhrArray.prototype.containsrouterarrayclass-validatorescapedebugpropiterateonceless mixinsjsonpatheventshooksdeterministicstructuredCloneprotobufreducerloadingsetPrototypeOfproxybeanstalkbddECMAScript 2017es-abstractdirthrottleconcatspinnersFloat64ArraydomjavascriptflatcoerciblebindcloudsearchpersistentformattingjapanesesuperstructquoteglobalArray.prototype.includeserrorvariablesvalidateform-validationurlsmake dirnodejsFunction.prototype.namedayjsRxJStostringtagroute53BigInt64Arraynested csssettingses-shimserror-handlingstdlibtypanionfile systemzerottytyped arraya11ywritableconfigurableObject.istestsharedJSONsymbolsargumentes2017kinesiscorsAsyncIteratorJSON-SchemasigintyamlimportexportframeworkhashES2019queueMicrotaskstyleguidehttptypedcss lessrapidESresolvepasswordbootstrap lesslibphonenumbersymbollookcolorvalueoptionoptimiststartratecore-jsavafindupcomputed-typesargparseoutputawesomesaucecall-bindexitsortopensfigletes2016faststateless.envwordbreakmergewindowsECMAScript 2021command-linematchestermslotdefaultUint8ClampedArrayArray.prototype.flatMapomitremoveWebSocketserializationES2023mimeeast-asian-widthairbnbencryptionawaitcolumns
2.2.18

30 days ago

2.2.17

1 month ago

2.2.15

1 month ago

2.2.16

1 month ago

2.2.14

1 month ago

2.2.13

1 month ago

2.2.12

1 month ago

2.2.11

1 month ago

2.2.10

1 month ago

2.1.10

1 month ago

2.1.9

1 month ago

2.1.8

1 month ago

2.1.7

1 month ago

1.1.7

1 month ago

1.1.6

1 month ago

1.1.5

1 month ago

1.1.4

2 months ago