Adding regex comments.
This commit is contained in:
		
							parent
							
								
									c1a3b5f045
								
							
						
					
					
						commit
						b6792784e8
					
				@ -363,8 +363,8 @@ class NodesApi {
 | 
			
		||||
    try {
 | 
			
		||||
      const publicKeySearch = search.replace('%', '') + '%';
 | 
			
		||||
      const aliasSearch = search
 | 
			
		||||
        .replace(/[-_.]/g, ' ')
 | 
			
		||||
        .replace(/[^a-zA-Z0-9 ]/g, '')
 | 
			
		||||
        .replace(/[-_.]/g, ' ') // Replace all -_. characters with empty space. Eg: "ln.nicehash" becomes "ln nicehash".  
 | 
			
		||||
        .replace(/[^a-zA-Z0-9 ]/g, '') // Remove all special characters and keep just A to Z, 0 to 9.
 | 
			
		||||
        .split(' ')
 | 
			
		||||
        .filter(key => key.length)
 | 
			
		||||
        .map((search) => '+' + search + '*').join(' ');
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user