Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
filt is for simple filters: node -e 'require("filt")(line => line.toUpperCase())'
filt is for simple filters:
node -e 'require("filt")(line => line.toUpperCase())'
This module allows you to quickly write command-line filters - programs that read standard input line by line and print something on standard output.
It prints an extra newline at the end - the split module used internally is apparently running the callback with an extra empty line at the end when there is none - I need to fix it.
Install to use in your project, updating the dependencies in package.json:
npm install filt --save
It currently has one dependency: split ...
Require the module:
var filt = require('filt');
Now filt
is a function that gets a function that is called for each line of stdin.
Most basic usage:
filt(function (line) {
console.log(line.toUpperCase());
});
Instead of calling console.log()
you can also return a line to print:
filt(function (line) {
return line.toUpperCase();
});
The same using ES6 syntax:
filt(line => line.toUpperCase());
Using require in the same line - this is the entire program:
require('filt')(line => line.toUpperCase());
Or straight from the command line:
node -e 'require("filt")(line => line.toUpperCase());'
For any bug reports or feature requests please post an issue on GitHub.
Rafał Pocztarski - https://github.com/rsp
MIT License (Expat). See LICENSE.md for details.
FAQs
filt is for simple filters: node -e 'require("filt")(line => line.toUpperCase())'
The npm package filt receives a total of 0 weekly downloads. As such, filt popularity was classified as not popular.
We found that filt 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.