New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

pcg32

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pcg32

A simple fast space-efficient statistically good algorithm for random number generation in JavaScript

latest
Source
npmnpm
Version
1.0.3
Version published
Maintainers
1
Created
Source

pcg32.js

open issues npm version

A simple fast space-efficient statistically good algorithm for random number generation in JavaScript.

Installation

npm install pcg32

or

yarn add pcg32

Usage

var PCG32 = require('pcg32')

var seed = 42;
var stream = 54;

var pcg32 = new PCG32(seed, stream);

// Print a radnom number between 0 and 4294967295
console.log(pcg32.random());

// Print a radnom number between 0 and 5
console.log(pcg32.random(6));

// Print 0 or 1
console.log(pcg32.random(2));

FAQs

Package last updated on 03 Mar 2021

Did you know?

Socket

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.

Install

Related posts