Merge pull request #84 from benyanke/patch-1
formatName - replace spaces with dashes
This commit is contained in:
commit
65ae347090
1 changed files with 4 additions and 2 deletions
|
@ -327,8 +327,10 @@ lbry.formatCredits = function(amount, precision)
|
|||
}
|
||||
|
||||
lbry.formatName = function(name) {
|
||||
// Converts LBRY name to standard format (all lower case, no special characters)
|
||||
return name.toLowerCase().replace(/[^a-z0-9\-]/g, '');
|
||||
// Converts LBRY name to standard format (all lower case, no special characters, spaces replaced by dashes)
|
||||
name = name.replace('/\s+/g', '-');
|
||||
name = name.toLowerCase().replace(/[^a-z0-9\-]/g, '');
|
||||
return name;
|
||||
}
|
||||
|
||||
lbry.loadJs = function(src, type, onload)
|
||||
|
|
Loading…
Reference in a new issue