Merge pull request #84 from benyanke/patch-1

formatName - replace spaces with dashes
This commit is contained in:
alexliebowitz 2016-11-21 00:18:42 -05:00 committed by GitHub
commit 65ae347090

View file

@ -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)