could-be-utils
v0.2.4
Published
Library containing utility functions in javascript.
Downloads
12
Readme
could-be-utils
Library containing utility functions in javascript.
"think twice, code once" 💡
Don't waste time writing the same utility functions everytime.
What's inside
List of different types of utilities:
- array
- distances
- random
- statistics
- graph
- dijkstra with maps
- bellman-ford with maps 🔥NEW🔥
All utilities module have their own readme file.
You can find all the documentation available here.
More are coming soon:
- graph algorithms:
- dijkstra with array
- bellman-ford with array
Usage
//import the modules
const utils = require("could-be-utils");
//use the module you want
// 1° way
//import and isolate the random module
const random = utils.random;
let random_integer_value = random.randi(0, 10);
// 2° way
// scan through the utils variable
let random_integer_value = utils.random.randi(0, 10);
//import the statistics module
const statistics = utils.statistics;
let avg = statistics.avg([1, 2, 3, 4, 5]); // avg = 3