JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 7
  • Score
    100M100P100Q51910F
  • 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 NPM License

Issues GitHub commit activity

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 strings/arrays/numbers
  • Random stuff on arrays/strings.

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

Full doc: documentation.md

Features

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

  • randFloor(a,b) , randInt(a,b) , randBytes(n) , randBits(n) , randSign() , randToken(n) , etc. → get random numbers/arrays/strings and more

  • shuffle(l) , choice(l,count) , pick(l) , pickPop(l) , etc. → 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 {randBytes,randToken} from 'randomiz' as for any other npm package ;)