"use strict";

/**
 * Tests if the string contains vowels
 * 
 * @returns {Boolean}
 */
<<<<<<< HEAD
String.prototype.hasVowels = function() {
    const matchRegex = /[aeiouAEIOU]/g;
    return matchRegex.test(this);
};

/**
 * Converts the string to solely upper case
 * 
 * @returns {String}
 */
String.prototype.toUpper = function() {
    let input = this;
    const matchRegex = /[a-z]/g;
    let lowerCaseCharacters = input.match(matchRegex);

    if(lowerCaseCharacters){
        //remove duplicates
        lowerCaseCharacters
            .filter((character,index) => {
                return lowerCaseCharacters.indexOf(character) === index; 
            })
            .map((character) => {
                let asciiValue = character.charCodeAt(0),
                    //there's a distance of 32 characters between upper case and lower case ascii characters
                    upperCaseAsciiValue = asciiValue - 32,
                    uppercaseStringValue = String.fromCharCode(upperCaseAsciiValue);
                    //replace all occurences of the character with the upper case
                 input = input.replace(new RegExp(character,"g"),uppercaseStringValue);
        })
    }

    return input;
};
=======
Object.defineProperty(String.prototype, "hasVowels", {
    value () {

        const matchRegex = new RegExp("[aeiou]","i");
        return matchRegex.test(this);

    }
});
>>>>>>> 894d755c5bb9fce0b8d254cafca9fcd9e144c560

@@ -85,21 +85,30 @@
  */%0A
-%3C%3C%3C%3C%3C%3C%3C HEAD%0A
+Object.defineProperty(
 Stri
@@ -119,17 +119,19 @@
 rototype
-.
+, %22
 hasVowel
@@ -135,64 +135,87 @@
 wels
- = function() %7B%0A    const matchRegex = /%5BaeiouAEIOU%5D/g;%0A
+%22, %7B%0A    value () %7B%0A%0A        const matchRegex = new RegExp(%22%5Baeiou%5D%22,%22i%22);%0A    
     
@@ -244,17 +244,25 @@
 (this);%0A
-%7D
+%0A    %7D%0A%7D)
 ;%0A%0A/**%0A 
@@ -267,16 +267,16 @@
 %0A * 
-Converts
+Tests if
  the
@@ -287,58 +287,76 @@
 ing 
-to solely upper case%0A * %0A * @returns %7BString%7D%0A */%0A
+contains vowels%0A * %0A * @returns %7BBoolean%7D%0A */%0AObject.defineProperty(
 Stri
@@ -371,32 +371,43 @@
 type
-.
+, %22
 toUpper
- = function() %7B%0A
+%22, %7B%0A    value () %7B%0A%0A    
     
@@ -424,24 +424,28 @@
 = this;%0A    
+ 
+   
 const matchR
@@ -463,17 +463,21 @@
 z%5D/g
-;
+,
 %0A    
-let
+       
  low
@@ -525,14 +525,19 @@
 );%0A%0A
+    
     if
+ 
 (low
@@ -553,26 +553,30 @@
 racters)
+ 
 %7B%0A
+%0A  
         
 //remove
@@ -563,24 +563,26 @@
 %0A%0A          
+  
 //remove dup
@@ -589,16 +589,20 @@
 licates%0A
+    
         
@@ -633,16 +633,20 @@
         
+  
+  
 .filter(
@@ -664,24 +664,29 @@
 index) =%3E %7B%0A
+%0A    
             
@@ -745,18 +745,22 @@
 = index;
- 
 %0A
+%0A    
         
@@ -778,16 +778,20 @@
         
+   
+ 
 .map((ch
@@ -804,16 +804,20 @@
 r) =%3E %7B%0A
+%0A   
         
@@ -824,18 +824,21 @@
         
-le
+ cons
 t asciiV
@@ -869,16 +869,20 @@
 eAt(0),%0A
+    
         
@@ -998,24 +998,28 @@
             
+    
 upperCaseAsc
@@ -1061,24 +1061,28 @@
             
+   
+ 
 uppercaseStr
@@ -1150,24 +1150,28 @@
             
+    
 //replace al
@@ -1190,16 +1190,27 @@
  of the 
+lower case 
 characte
@@ -1248,16 +1248,19 @@
         
+   
 input = 
@@ -1322,24 +1322,25 @@
 Value);%0A
+%0A
         
 %7D)%0A    %7D
@@ -1335,266 +1335,61 @@
     
-%7D)%0A
     
-%7D%0A%0A
     
-return input;%0A%7D;%0A=======%0AObject.defineProperty(String.prototype, %22hasVowels%22, %7B%0A    value () %7B%0A%0A        const matchRegex = new RegExp(%22%5Baeiou%5D%22,%22i%22);%0A        return matchRegex.test(this);%0A%0A    %7D%0A%7D);%0A%3E%3E%3E%3E%3E%3E%3E 894d755c5bb9fce0b8d254cafca9fcd9e144c560
+%7D);%0A%0A        %7D%0A%0A        return input;%0A%0A    %7D%0A%7D);
 %0A

add to uppercase feature