
Security News
Another Round of TEA Protocol Spam Floods npm, But It’s Not a Worm
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.
It's just a wrapper to build Stream transformers with functional style. It's like the koa / expressjs middlewares !
const ezs = require('ezs')
ezs.use(require('ezs-basics'));
process.stdin.resume();
process.stdin.setEncoding('utf8');
process.stdin
.pipe(ezs('split', { delimiter: "\n" }))
.pipe(ezs('counter'))
.pipe(ezs((input, output) => output.send(input.toString()));
.pipe(process.stdout);
With npm:
$ npm install ezs
Each statement function have its own scope and can access to few methods :
Output object is an object with few methods :
With a sync statement, you can break the pipe with throw but with an async statement, you should use stop(with An Error) instead of throw.
The command line interface is used to create run pipelines described in .ini files.
It is also possible to launch a web server allowing remote execution of .ini files
$ ezs -h ven. 15 mars 2019 16:15:20 CET
Usage: ezs [options] [<file>|<directory>] [<file2> <file3> ...]
Options:
--help Affiche de l'aide [booléen]
--version Affiche le numéro de version [booléen]
--verbose, -v Enable debug mode with DEBUG=ezs [booléen] [défaut: false]
--daemon, -d Launch daemon on a directory containing commands script
[chaine de caractère]
--server, -s Server to dispach commands [chaine de caractère]
--env, -e Execute commands with environement variables as input
[booléen] [défaut: false]
for more information, find our manual at https://github.com/touv/node-ezs
Converts a transform stream with existing function or adhoc function.
const ezs = require('ezs'),
let transformer = ezs(function(input, output) {
output.send(input.toString())
})
Adding bundle of statements. see the avaible modules here : https://www.npmjs.com/browse/keyword/ezs
import ezs from 'ezs';
import basics from 'ezs-basics';
import files from 'ezs-files';
ezs.use(basics);
ezs.use(files);
catch Error in NodeJS pipeline
// Example #1
process.stdin
.pipe(ezs('truncate', { length: 100 }))
.pipe(ezs((d, f) => f.send(new Error('Badaboum')))))
.pipe(ezs.catch(e => e)) // catch errors in chunks and throw a error, which breaking the pipeline
.on('error', console.error)
// Example #2
process.stdin
.pipe(ezs('truncate', { length: 100 }))
.pipe(ezs((d, f) => f.send(new Error('Badaboum')))))
.pipe(ezs.catch(e => console.error('Warning:', e))) // catch errors in chunks to display them without breaking the pipeline
get chunk of in NodeJS pipeline and send Buffer of the chunk
process.stdin
.pipe(ezs('replace', { path: 'id', value: 'xxxxx' }))
.pipe(ezs('dump'))
.pipe(ezs.toBuffer())
.pipe(process.stdout);
Take Object and add new field
Returns Object
Take all String, concat them and thow just one
datafeedbeginWith String? Add value at the beginjoinWith String? use value to join 2 chunkendWith String? Add value at the endReturns String
Take Object , print it and throw the same object
datafeedlevel String console level : log or error (optional, default log)text String text before the dump (optional, default valueOf)path String? path of field to printReturns Object
Takes an Object delegate processing to an external pipeline
datafeedfile String? the external pipeline is descrbied in a filescript String? the external pipeline is descrbied in a sting of characterscommands String? the external pipeline is descrbied in objectReturns Object
Takes an Object dispatch processing to an external pipeline in one or more servers
datafeedserver String? servers to dispatch datafile String? the external pipeline is descrbied in a filescript String? the external pipeline is descrbied in a sting of characterscommands String? the external pipeline is descrbied in objectReturns Object
Take all Object and genereta a json array
datafeedindent String indent JSON (optional, default false)Returns String
Take Object and send the same object
but in the meantime, it is possible to add
new environment field
Returns Object
Take Object and throw each value of fields
datafeedpath String? path of field to extractReturns Object
Take all chunk, and throw array of chunks
datafeedsize Number? Size of each partitionReturns String
Take Object and throw the same object but keep only
spefici fields
datafeedpath String? path of field to keepReturns Object
Take all Object, throw encoded String
datafeedReturns String
Take Object and create a new object with some fields
Returns Object
Take the first Object and close the feed
datafeedReturns Object
Take Object, shuffle data of the whole object or only some fields specified by path
datafeedpath String? path of field to shuffleReturns Object
Take Object, print a character and throw the same object
datafeedprint String character to print at each object (optional, default .)last String character to print at last call (optional, default .)first String character to print at first call (optional, default .)Returns Object
Take Object and throw the same object
datafeedReturns Object
Takes all the chunks, and closes the feed when the total length is equal to the parameter
datafeedlength Number? Length of the feedReturns Mixed
Take all chunk, and throw each item of chunks
datafeedReturns String
Take String and throw Object builded by JSON.parse on each line
datafeedReturns String
Take Object and throw the same object if all rules passes
Returns Object
FAQs
A wrapper to build Stream transformers with functional style
We found that ezs demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.

Security News
PyPI adds Trusted Publishing support for GitLab Self-Managed as adoption reaches 25% of uploads

Research
/Security News
A malicious Chrome extension posing as an Ethereum wallet steals seed phrases by encoding them into Sui transactions, enabling full wallet takeover.