All Projects → nastyox → Rando.js

nastyox / Rando.js

Licence: unlicense
The world's easiest, most powerful random function.

Programming Languages

javascript
184084 projects - #8 most used programming language
js
455 projects

Projects that are alternatives of or similar to Rando.js

Length.js
📏 JavaScript library for length units conversion.
Stars: ✭ 292 (-55.69%)
Mutual labels:  open-source, library, npm, npm-package, javascript-library
Angular Tree Component
A simple yet powerful tree component for Angular (>=2)
Stars: ✭ 1,031 (+56.45%)
Mutual labels:  open-source, opensource, library, javascript-library
Node Loadbalance
A collection of distilled load balancing engines
Stars: ✭ 79 (-88.01%)
Mutual labels:  npm-package, node-module, npm-module, node-js
Awesome Node Utils
some useful npm packages for nodejs itself
Stars: ✭ 51 (-92.26%)
Mutual labels:  npm, npm-package, node-module, npm-module
Ngx Smart Modal
Modal/Dialog component crafted for Angular
Stars: ✭ 256 (-61.15%)
Mutual labels:  library, npm, npm-package, npm-module
Singlespotify
🎵 Create Spotify playlists based on one artist through the command line
Stars: ✭ 254 (-61.46%)
Mutual labels:  npm, npm-package, node-module, npm-module
Flexsearch
Next-Generation full text search library for Browser and Node.js
Stars: ✭ 8,108 (+1130.35%)
Mutual labels:  open-source, node-module, javascript-library
Minimal Feedback
🗳 minimal-feedback is a blazingly fast and highly customizable component to get user feedback.
Stars: ✭ 78 (-88.16%)
Mutual labels:  open-source, npm, npm-package
Cash Cli
💰💰 Convert currency rates directly from your terminal!
Stars: ✭ 168 (-74.51%)
Mutual labels:  open-source, npm, npm-package
windows-network-drive
Do network drive stuff on Microsoft Window in node
Stars: ✭ 18 (-97.27%)
Mutual labels:  npm-package, npm-module, node-js
Random Bytes Readable Stream
Creates a readable stream producing cryptographically strong pseudo-random data using `crypto.randomBytes()`
Stars: ✭ 71 (-89.23%)
Mutual labels:  random, npm-package, crypto
ifto
A simple debugging module for AWS Lambda (λ) timeout
Stars: ✭ 72 (-89.07%)
Mutual labels:  npm-module, node-js, node-module
express-mvc-generator
Express' Model View Controller Application Generator.
Stars: ✭ 46 (-93.02%)
Mutual labels:  npm-package, npm-module, node-js
Abort Controller
An implementation of WHATWG AbortController interface.
Stars: ✭ 213 (-67.68%)
Mutual labels:  library, npm-package, npm-module
Angular Open Source Starter
This is a starter project for creating open-source libraries for Angular. It is a full fledged Angular workspace with demo application and easy library addition. It is designed to be used for open-sourcing libraries on Github and has everything you'd need ready for CI, code coverage, SSR testing, StackBlitz demo deployment and more.
Stars: ✭ 120 (-81.79%)
Mutual labels:  open-source, opensource, library
Libsodium Go
A complete overhaul of the Golang wrapper for libsodium
Stars: ✭ 105 (-84.07%)
Mutual labels:  library, cryptography, crypto
arcscord
A Discord library written in typescript
Stars: ✭ 18 (-97.27%)
Mutual labels:  npm-package, npm-module, node-js
Solidarity
Solidarity is an environment checker for project dependencies across multiple machines.
Stars: ✭ 540 (-18.06%)
Mutual labels:  node-module, node-js, javascript-library
Ts ci
✅ Continuous integration setup for TypeScript projects via GitHub Actions.
Stars: ✭ 225 (-65.86%)
Mutual labels:  npm, npm-package, npm-module
Cpx
A cli tool to watch and copy file globs.
Stars: ✭ 394 (-40.21%)
Mutual labels:  npm, npm-package, npm-module

Gray shape shifter

Rando.js

The world's easiest, most powerful random function.

Tweet




🙉 What's all the hullabaloo?

Rando.js helps JavaScript developers code randomness more simply, readably, and securely. Whether you need to find a random int/float between two numbers, pick a random value from an array, choose a random element from your jQuery object, grab a character from a string, toss a coin, or do anything of the like while even preventing repetitions, we've got you covered at a cryptographically strong level. The best part? Our library is extremely lightweight and developer friendly- which means it won't take a toll on your project, and it's uber-simple to implement.


⚡️ Fast implementation

Step 1: Paste the following script tag into the head of your HTML document:

<script src="https://randojs.com/2.0.0.js"></script>

Or, use npm:

//Install:
npm i @nastyox/rando.js

//Then, paste this at the top of your JavaScript file:
const {rando, randoSequence} = require('@nastyox/rando.js');

//Note: If your project is a module, you can paste this in your JavaScript file instead:
import {rando, randoSequence} from '@nastyox/rando.js';

Step 2: Use any of the commands explained at https://randojs.com/ however you like.


🎉 Examples

 rando()                       //a floating-point number between 0 and 1 (could be exactly 0, but never exactly 1)  
 rando(5)                      //an integer between 0 and 5 (could be 0 or 5)  
 rando(5, 10)                  //a random integer between 5 and 10 (could be 5 or 10)  
 rando(5, "float")             //a floating-point number between 0 and 5 (could be exactly 0, but never exactly 5)  
 rando(5, 10, "float")         //a floating-point number between 5 and 10 (could be exactly 5, but never exactly 10)  
 rando(true, false)            //either true or false  
 rando(["a", "b"])             //{index:..., value:...} object representing a value of the provided array OR false if array is empty  
 rando({a: 1, b: 2})           //{key:..., value:...} object representing a property of the provided object OR false if object has no properties  
 rando($("div"))               //{index:..., value:...} object representing a jQuery element from the provided jQuery element set OR false if the provided jQuery element set does not contain any elements.  
 rando("Gee willikers!")       //a character from the provided string OR false if the string is empty. Reoccurring characters will naturally form a more likely return value  
 rando(null)                   //ANY invalid arguments return false  

⇢ Prevent repetitions by grabbing a sequence and looping through it

 randoSequence(5)              //an array of integers from 0 through 5 in random order  
 randoSequence(5, 10)          //an array of integers from 5 through 10 in random order  
 randoSequence(["a", "b"])     //an array of {index:..., value:...} objects representing the values of the provided array in random order  
 randoSequence({a: 1, b: 2})   //an array of {key:..., value:...} objects representing the properties of the provided object in random order  
 randoSequence($("div"))       //an array of {index:..., value:...} objects representing all jQuery elements from the provided jQuery element set in random order.   
 randoSequence("Good gravy!")  //an array of the characters of the provided string in random order  
 randoSequence(null)           //ANY invalid arguments return false




👏 Supporters

Stargazers repo roster for @nastyox/Rando.js Forkers repo roster for @nastyox/Rando.js

Animated footer bars


Back to top

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].