Security News
The Push to Ban Ransom Payments Is Gaining Momentum
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
@no-day/fp-ts-lcg
Advanced tools
A seeded pseudorandom number generator based on the linear congruential generator algorithm.
Readme
A seeded pseudorandom number generator based on the linear congruential generator algorithm.
A port of purescript-lcg.
Uses fp-ts
as a peer dependency.
npm install fp-ts @no-day/lcg
// index.js
const lcg = require("@no-day/lcg");
let seed = lcg.mkSeed(3532);
for (let i = 0; i < 10; i++) {
console.log(lcg.unSeed(seed));
seed = lcg.lcgNext(seed);
}
Result:
node index.js
3533
170541443
901176102
1242866010
134522471
1691132760
373584549
879580920
351404483
1819954887
The generated seeds are pseudo random. Meaning, that whenever the same initial seed is chosen (here it's 3532), the results of the next seeds will be always the same. The generated seeds will be eqaully distributed in the range of lcg.seedMin
and lcg.seedMax
.
FAQs
A seeded pseudorandom number generator based on the linear congruential generator algorithm.
We found that @no-day/fp-ts-lcg 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
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
Application Security
New SEC disclosure rules aim to enforce timely cyber incident reporting, but fear of job loss and inadequate resources lead to significant underreporting.
Security News
The Python Software Foundation has secured a 5-year sponsorship from Fastly that supports PSF's activities and events, most notably the security and reliability of the Python Package Index (PyPI).