No description
  • JavaScript 100%
Find a file
Bryle Baligad (laptop-win) 57eec94909 Export function
2024-02-19 10:25:41 +08:00
lang_img remove .DS_Store 2022-07-19 19:01:47 +08:00
.gitignore add jest testing 2022-07-19 19:43:35 +08:00
comlib.js Export function 2024-02-19 10:25:41 +08:00
comlib.test.js add new 2022-09-23 13:38:35 +08:00
readme.md Add set random interval 2024-02-19 10:20:52 +08:00

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.