
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
This module implements 1D noise reduction filters. There are currently two available:
median filter
rolling average with threshold
median(data, windowSize)
data
: An array of numbers.
windowSize
: The size of the window over which the median is applied.
Should be an odd number greater than one, defaults to 3
.
var median = require('filters').median;
var raw = [ 2, 3, 4, 9, 6, 2 ];
console.log(median(raw));
// => [ 2, 3, 4, 6, 6, 2 ]
average(data, windowSize, threshold)
data
: An array of numbers.
windowSize
: The size of the rolling average window. Should be two or
greater, defaults to 3
.
threshold
: Maximum difference between two numbers for the average still to
be applied. Use this to smooth out small variations but large varitions
through immediately. The difference between /a/ and /b/ is calculated as
/(max(a, b) - min(a, b)) / max(a, b)/. No default.
var median = require('filters').average;
var raw = [ 2, 3, 4, 9, 6, 2 ];
console.log(average(raw, 3, 0.5));
// => [ 2, 2.5, 3, 9, 7.5, 2 ]
MIT
FAQs
1D noise reduction filters
The npm package filters receives a total of 24 weekly downloads. As such, filters popularity was classified as not popular.
We found that filters 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
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.