Skip to content
Snippets Groups Projects
Commit cb5dbd80 authored by DCoded's avatar DCoded
Browse files

Replaced .capitalize() with .between()

parent 192dfa54
No related branches found
No related tags found
1 merge request!9355Replaced between() with .between()
String.prototype.capitalize = function() {
return this.charAt(0).toUpperCase() + this.substr(1);
/**
* Checks if the number is between two given values.
* @param {number} min The minimum value.
* @param {number} max The maximum value.
* @param {boolean} inclusive Whether or not to include the minimum and maximum values.
*/
Number.prototype.between = function(min, max, inclusive = false) {
return inclusive ? this >= min && this <= max : this > min && this < max;
};
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment