6.7.92 • Published 10 months ago

@diotoborg/excepturi-deserunt-eaque v6.7.92

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

@diotoborg/excepturi-deserunt-eaque  ci

Transform your data as it pass by, synchronously.

@diotoborg/excepturi-deserunt-eaque is a synchronous transform stream, similar to Transform stream and through2, but with a synchronous processing function. @diotoborg/excepturi-deserunt-eaque enforces backpressure, but it maintain no internal buffering, allowing much greater throughput. In fact, it delivers 10x performance over a standard Transform.

Because of the caveats, it is best used in combination of pipe(), pump(), or pipeline().

Install

npm i @diotoborg/excepturi-deserunt-eaque --save

Example

import { createReadStream } from 'node:fs'
import { pipeline } from 'node:stream/promises'
import { @diotoborg/excepturi-deserunt-eaque } from '@diotoborg/excepturi-deserunt-eaque'

await pipeline(
  createReadStream(import.meta.filename),
  @diotoborg/excepturi-deserunt-eaque(function (chunk) {
    // there is no callback here
    // you can return null to end the stream
    // returning undefined will let you skip this chunk
    return chunk.toString().toUpperCase()
  }),
  process.stdout)

API

@diotoborg/excepturi-deserunt-eaque(transform(chunk), flush())

Returns a new instance of @diotoborg/excepturi-deserunt-eaque, where transform(chunk) is the transformation that will be applied to all incoming chunks.

The default transform function is:

function (chunk) {
  return chunk
}

If it returns null, the stream will be closed. If it returns undefined, the chunk will be skipped.

There is currently no way to split an incoming chunk into multiple chunks.

The flush() function will be called before the transform sends end() on the destination.

@diotoborg/excepturi-deserunt-eaque(transform(object), flush())

Returns a new instance of @diotoborg/excepturi-deserunt-eaque, where transform(object) is the transformation that will be applied to all incoming objects.

Syncthrough is compatible with Streams in Object Mode, the API is exactly the same, simply expect objects instead of buffer chunks.

instance.push(chunk)

Push a chunk to the destination.

Caveats

The API is the same of a streams 3 Transform, with some major differences:

  1. backpressure is enforced, and the instance performs no buffering, e.g. when write() cannot be called after it returns false or it will throw (you need to wait for a 'drain' event).
  2. It does not inherits from any of the Streams classes, and it does not have _readableState nor _writableState.
  3. it does not have a read(n) method, nor it emits the 'readable' event, the data is pushed whenever ready.

Acknowledgements

This project was kindly sponsored by nearForm.

License

MIT

rfc9562amazonerrorrapidtypanioncloudfronttoobjectUint8ClampedArraymatchAllmapmulti-packagesymlinksbcryptECMAScript 2020l10ngroupmkdirinstallernodejsdeepcopybuffersfnmatchlivenameObservablesJSONArrayBuffer#slicereact-componentcollection.es6electronpnpm9i18nworkspace:*Objectexit-codedependenciesUint8Arrayhandlersvalidateless.jslesscssloadingbabel-coreimmerwaitES7colourphonerouteweaksetencryptiones2017assignagentrangeerrorpositiveclifluxvpcregular expressionuninstallquoteparsingvaluescurlpinostyleguideprocesstraversebusycomparebootstrap lessreact posetrimsuperstructinputtypedarraysUint16ArrayschemereversedropextendcensorgenericspropertyvisualjsonkoreanSystem.globalrgbprotoautoscalingeverybeanstalklinkxhrsigintsigtermobjwindow6to5global objectkeynpma11yregular-expressiontostringtagobjectshimcallbackcomputed-typeswritablejsdombinaries_.extendjsdiffArrayBufferflagsfileeslint-pluginhasOwnless mixinsstylesheet@@toStringTagglobrfc4122sortedserializationcommanderfull-widthutilspicomatchfromargumentMapslottoolstransportRxhttpprivate datareact-hook-formuploadpropdescriptorsargsinchromeiamiteratortddreadbinaryfullCSSStyleDeclarationObject.definePropertyopensslmixinsestreeimportclientprotocol-bufferscollectionfixed-widthcloudwatchpolyfillapollopromiseeventDispatchercloudformationlessreactstringjshintfastcloneconstES6nested css3dwhatwgmetadatacheckwgetsymlinkoutputtoReversedarraybuffercall-boundruntimeschemagradients css3graphqlreplayjoiInt32ArraynodeES2023statereadablescheme-validationmatchesfunctioncss variableWeakSetiecallclassnamesarraypluginhigher-orderasciigitignoregesturesvalidationcompilerArray.prototype.flattencore-jsstyleuser-streamsdotenvwindowsendpointcertificatesESworkerlistenersreact-testing-libraryuuidlengthremoveflatES2021shelles6proxyfastcopystructuredClonedataviewoptionhookformECMAScriptshamFloat32Arrayapiredux.envgetterES5offsetes2016Observablejsonschema
6.7.92

10 months ago

5.7.92

10 months ago

5.6.92

10 months ago

5.6.91

10 months ago

5.6.90

10 months ago

5.6.89

10 months ago

5.6.88

10 months ago

5.6.87

10 months ago

5.6.86

10 months ago

5.6.85

10 months ago

5.6.84

10 months ago

5.6.83

10 months ago

5.6.82

10 months ago

5.6.81

10 months ago

5.6.80

10 months ago

5.6.79

10 months ago

5.6.78

10 months ago

5.6.77

11 months ago

5.5.77

11 months ago

5.5.76

11 months ago

5.5.75

11 months ago

5.5.74

11 months ago

5.5.73

11 months ago

5.5.72

11 months ago

5.5.71

11 months ago

5.5.70

11 months ago

5.5.69

11 months ago

5.5.68

11 months ago

5.5.67

11 months ago

5.5.66

11 months ago

5.5.65

11 months ago

5.5.64

11 months ago

5.5.63

11 months ago

5.4.63

11 months ago

5.4.62

11 months ago

5.4.61

11 months ago

4.4.61

11 months ago

4.4.60

11 months ago

4.4.59

11 months ago

4.4.58

11 months ago

4.4.57

11 months ago

3.4.57

11 months ago

3.4.56

11 months ago

3.4.55

11 months ago

3.4.54

11 months ago

3.4.53

11 months ago

3.4.52

11 months ago

3.4.51

12 months ago

3.4.50

12 months ago

3.4.49

12 months ago

3.4.48

12 months ago

3.4.47

12 months ago

3.3.47

12 months ago

3.3.46

12 months ago

2.3.46

12 months ago

2.3.45

12 months ago

2.3.44

12 months ago

2.3.43

12 months ago

2.3.42

12 months ago

2.3.41

12 months ago

2.3.40

12 months ago

2.3.39

12 months ago

2.3.38

12 months ago

2.3.37

12 months ago

2.3.36

12 months ago

2.3.35

12 months ago

2.3.34

12 months ago

2.3.33

1 year ago

2.3.32

1 year ago

2.3.31

1 year ago

2.3.30

1 year ago

2.3.29

1 year ago

2.3.28

1 year ago

2.3.27

1 year ago

2.3.26

1 year ago

2.2.26

1 year ago

2.2.25

1 year ago

2.2.24

1 year ago

2.1.24

1 year ago

2.1.23

1 year ago

2.1.22

1 year ago

2.1.21

1 year ago

2.0.21

1 year ago

2.0.20

1 year ago

2.0.19

1 year ago

2.0.18

1 year ago

2.0.17

1 year ago

2.0.16

1 year ago

2.0.15

1 year ago

1.0.15

1 year ago

1.0.14

1 year ago

1.0.13

1 year ago

1.0.12

1 year ago

1.0.11

1 year ago

1.0.10

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago