0.5.2 • Published 3 months ago

file-utils-processors-ts v0.5.2

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

file-utils-processors-ts

Bun CI npm

Connector Architecture Typescript processors for handling file operations. It currently exposes 5 functions:

js:GlobRead

This function relies on the glob library to select a set of files according to a shell expression and stream them out in a sequential fashion. A wait parameter can be defined to wait x milliseconds between file streaming operations.

js:FolderRead

This function reads all the files present in a given folder and streams out their content in a sequential fashion. A maxMemory parameter can be given (in GB) to defined threshold of maximum used memory by the streaming process. When the threshold is exceeded, the streaming process will pause for as many milliseconds as defined by the pause parameter.

js:Substitute

This function transform a stream by applying a given string substitution on each of the messages. The matching string can be a regex defined by the source property and setting the regexp property to true.

js:Envsub

This function substitute all the defined environment variables on each of the elements of an input stream that have been labeled with a ${VAR_NAME} pattern.

js:ReadFile

This function can read on demand and push downstream the contents of a file located in a predefined folder. This processor is used mostly for testing and demonstrating pipeline implementations.

js:UnzipFile

This function can receive a zipped file in the form of a Buffer and stream out its decompressed contents.

0.5.2

3 months ago

0.5.1

3 months ago

0.5.0

3 months ago

0.4.0

6 months ago

0.3.2

6 months ago

0.3.1

6 months ago

0.3.0

6 months ago

0.2.4

7 months ago

0.2.3

7 months ago

0.2.2

7 months ago

0.2.1

7 months ago

0.2.0

7 months ago

0.1.0

7 months ago