
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
essy-distribution
Advanced tools
npm install essy-distribution
Defines multiple distributions with methods for random sampling and calculating distribution properties. Sampling functions are largely ported from CERN's cern.jet.random Java package. See the source code for details.
This package was created during the development of Essy Tree to support Monte Carlo simulations.
var dists = require('essy-distribution');
var normal = new dists.Normal(0, 1);
var mean = normal.mean(); // 0
var sample = normal.sample(); // eg, 0.2314311234
import { Normal } from 'essy-distribution';
var normal = new Normal(0, 1);
var mean = normal.mean(); // 0
var sample = normal.sample(); // eg, 0.2314311234
Or you can load the entire package:
import * as dists from 'essy-distribution';
var normal = new dists.Normal(0, 1);
var mean = normal.mean(); // 0
var sample = normal.sample(); // eg, 0.2314311234
Each distribution defines the following methods:
Cumulative distribution function.
Returns distribution mean.
Returns distribution median.
Probability density function.
Samples the distribution. If no arguments are provided or n = 1
a single
sampled value is returned. If n
is greater than 1, an array of n
sampled
values is returned.
The method accepts an optional generator
object that defines a method random()
.
If no generator is provided a mersenne-twister is used.
Returns variance.
See documentation.
See documentation.
See article.
See article.
A custom distribution. The values
argument should be an array of numbers.
See documentation.
See documentation.
See article.
See documentation.
See article.
See documentation.
See article.
See documentation.
See documentation.
See documentation.
See documentation.
See documentation.
See article.
See documentation.
See documentation.
See article.
See documentation.
See documentation.
See documentation.
FAQs
Distributions and random sampling.
The npm package essy-distribution receives a total of 28 weekly downloads. As such, essy-distribution popularity was classified as not popular.
We found that essy-distribution 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
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.