
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
A random module for JavaScript, generate random numbers follow different random distributions, including Uniform, Gaussian, Poisson, Exponential, Gamma, Lognormal, Cauchy, Chisquared, Binomial, Weibull and so on
Random module for JavaScript
JSrandom.randFloat(5);// <=> JSrandom.randFloat(0,5)
//=>1.4567891701389055
JSrandom.randFloat(-2,3);
//=>-0.37792440940529315
JSrandom.randInt(5);// <=> JSrandom.randInt(0,5)
//=>2
JSrandom.randInt(-2,3);
//=>-1
JSrandom.select("abcdefg");
//=>"f"
JSrandom.select([0,2,3,5,2,9,1],Math.random);
//=>5
JSrandom.sample("abcdefg");
//=>["b", "e", "c", "a", "d", "f", "g"]
JSrandom.sample([0,2,3,5,2,9,1],3);
//=>[5, 0, 2]
JSrandom.shuffle("abcdefg");
//=>"bacdegf"
JSrandom.shuffle([0,2,3,5,2,9,1]);
//=>[0, 3, 2, 9, 5, 2, 1]
var generator = JSrandom.Uniform(0,10);
generator();
//=>2.0685795052296387
var generator = JSrandom.Gaussian(0,1);
generator();
//=>0.6532581496839591
var generator = JSrandom.Bernoulli(0.5);
generator();
//=>true
generator();
//=>false
var generator = JSrandom.Binomial(10,0.5);
generator();
//=>8
generator();
//=>3
var generator = JSrandom.Cauchy(3,1);
generator();
//=>5.677625315054479
generator();
//=>-10.669827067906697
var generator = JSrandom.Exponential(3);
generator();
//=>0.21951388774858185
generator();
//=>0.15475914346331018
JSrandom.uniform();
//=>0.22049420430347985
JSrandom.gaussian();
//=>1.7041861226289101
JSrandom.bernoulli(0.8);
//=>true
JSrandom.exponential(3);
//=>0.29350827394207385
###Other generator
FAQs
A random module for JavaScript, generate random numbers follow different random distributions, including Uniform, Gaussian, Poisson, Exponential, Gamma, Lognormal, Cauchy, Chisquared, Binomial, Weibull and so on
The npm package jsrand receives a total of 6 weekly downloads. As such, jsrand popularity was classified as not popular.
We found that jsrand 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.