mirror of
https://github.com/BryleBaligad/comlib
synced 2026-10-09 21:36:37 +08:00
No description
- JavaScript 100%
| lang_img | ||
| .gitignore | ||
| comlib.js | ||
| comlib.test.js | ||
| readme.md | ||
BryleBaligad Common Library
This library contains all (or most of) the methods commonly used in my projects.
Methods may be implemented in other languages in the future.
Methods
| Method | Syntax | Description | Languages |
|---|---|---|---|
| Is Even | isEven(number) |
Returns true if number is even | |
| Is Odd | isOdd(number) |
Returns true if number is odd | |
| Random (Length) | randomLength(length) |
Returns a random number of a specified length | |
| Random (Min, Max) | randomMinMax(min, max) |
Returns a random number between two specified numbers | |
| Random String | randomString(length) |
Returns a random string of a specified length | |
| Scramble | scramble(array) |
Scrambles an array | |
| Seconds to Time | secondsToTime(seconds) |
Converts seconds to HH:MM:SS.ms | |
| Set Random Interval | setRandomInterval(function, minDelay, maxDelay) |
Executes a function at random intervals |
Testing
Clone this repository, run npm i jest --save-dev, and run jest in the cloned directory.