JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 4
  • Score
    100M100P100Q51706F
  • License MIT

A npm library making randomness easier

Package Exports

  • randomiz
  • randomiz/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (randomiz) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

NPM Version

Issues GitHub commit activity NPM License

Randomiz - Randomness is easy now!

A lightweight JavaScript utility library for generating random numbers, selecting random elements, and shuffling arrays. This module provides commonly used randomization utilities to simplify your code.

Introduction

randomiz includes utility functions for:

  • Generating with flexibility random numbers.
  • Random stuff on arrays.

Feel free to report any issues or fork on GitHub: https://github.com/manerr/randomiz

Features

  • Simple and lightweight: Minimal code, no dependencies. [No more features, what were you waiting from a ranomness library?]

  • randFloor(a,b) , randInt(a,b) , randBytes(n) , randBits(n) , randToken(n)get random numbers/arrays/strings

  • shuffle(l) , choice(l,count) , pick(l) , pickPop(l)random tools on arrays (strings are converted to 1-char arrays)

These functions are useful for game development, data sampling, and other scenarios requiring randomness.

Installation

Add the library to your project by copying the code or using a package manager (like npm :3 ) -> npm -i randomiz

( just use randomiz = require('randomiz') or import randomiz from 'randomiz' ad for any other npm package ;) )