@issos1993/flow-random

1.1.5 • Public • Published

flow-random-js

flow-random-js is a library for generating random flows based on probabilities.

Installation

To install flow-random-js into your project, you can use npm:

npm install flow-random

Usage

import { flowRandom } from 'flow-random';

// Generate a random flow with a custom probability (optional, default is 100)
const resultado = flowRandom(); // Returns `true` or `false` based on probability
console.log(resultado); // Result of the random flow

Params

probability (optional): An integer representing the probability for the flow to be true. Default is 100.

Example

// Generate a random flow with a 75% probability
const resultado = flowRandom(75); // Returns `true` or `false` based on probability
console.log(resultado); // Result of the random flow

Contributing

Feel free to contribute to this library! If you have suggestions, issues, or enhancements, please open an issue or a pull request.

License

This project is licensed under the MIT License.

Package Sidebar

Install

npm i @issos1993/flow-random

Weekly Downloads

4

Version

1.1.5

License

MIT

Unpacked Size

19.4 kB

Total Files

17

Last publish

Collaborators

  • issos1993