![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
An exponential weighted moving average for Node.js and the browser!
npm install -g ewma
Compute the exponential weighted moving average of a series of values. The
time at which you insert the value into Ewma
is used to compute a weight
(recent points are weighted higher). The parameter for defining the
convergence speed (like most decay process) is the half-life.
e.g. with a half-life of 10 unit, if you insert 100 at t=0 and 200 at t=10 the ewma will be equal to (200 - 100)/2 = 150 (half of the distance between the new and the old value).
var ewma = new EWMA(halfLifeMs, initialValue, clock)
halfLifeMs
- {Number}
parameter representing the speed of convergenceinitialValue
- {Number}
initial valueclock
- Optional {Number}
clock object used to read time, must support
Date.now()
style method. Defaults to Date
.returns an object computing the ewma average
ewma.insert(x)
x
- The next value, ewma
will automatically compute the EWMA based on the
clock difference between this value and the last time insert
was
calledewma.reset(x)
x
- Set the EWMA to exactly x
.ewma.value()
Returns the current EWMA value.
These are generated using a 500ms interval with a half life indicated in the key. For the source code, or to reproduce yourself, check the Example directory.
Contributions welcome, please ensure make
runs clean.
MIT
FAQs
Exponentially Weighted Moving Average
The npm package ewma receives a total of 111,860 weekly downloads. As such, ewma popularity was classified as popular.
We found that ewma 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.