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

crandom

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

crandom

A random number generator based on circular equations

latest
Source
npmnpm
Version
1.0.5
Version published
Weekly downloads
1
-50%
Maintainers
1
Weekly downloads
 
Created
Source

crandom

A simple random number generator based on circular equations.

Difficulty is adjustable by changing the power of the equation.

Usage

Importing

with Typescript

import crandom from 'crandom';

with Vanilla Javascript

const { default: crandom } = require('crandom');

Generating

Generate a random number between 1 and 5 with difficulty 3:

const num = crandom.rand(1, 5);
num // 4

Generate a random number between 0 and 100 with difficulty 5:

const num = crandom.rand(0, 100, 5);
num // 9

Keywords

random

FAQs

Package last updated on 08 Aug 2022

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