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

prand

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prand

random generators

latest
Source
npmnpm
Version
0.0.3
Version published
Maintainers
1
Created
Source

PRAND random generators with device entropy sources, 'nix only

Prerequisites

  • python, numpy, cython

Install

npm i prand
  • rand uses /dev/random as entropy, returns n random numbers in [0, 1) range
const rand = require('prand').rand;
let n = 5;
rand(n)
    .then(r => {
        console.log(r);
    })
    .catch(e => { console.error(e); });
  • urand (pseudo-random) uses /dev/urandom as entropy, returns n pseudo-random numbers in [0, 1) range
const urand = require('prand').urand;
let n = 8;
urand(n)
    .then(r => {
        console.log(r);
    })
    .catch(e => { console.error(e); });
  • mwc (multiply-with-carry) and mersenne-twister are deprecated

background

Keywords

random

FAQs

Package last updated on 22 May 2018

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