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