could-be-utils

0.2.4 • Public • Published

GitHub issues GitHub npm npm

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

Readme

Keywords

Package Sidebar

Install

npm i could-be-utils

Weekly Downloads

3

Version

0.2.4

License

MIT

Unpacked Size

303 kB

Total Files

38

Last publish

Collaborators

  • davide97g