Add uri.normalizeLbryUri()

This commit is contained in:
Alex Liebowitz 2017-04-10 21:18:58 -04:00
parent 839e629362
commit af32951d1f

View file

@ -115,4 +115,10 @@ uri.buildLbryUri = function(uriObj, includeProto=true) {
(path ? `/${path}` : '');
}
/* Takes a parseable LBRY URI and converts it to standard, canonical format (currently this just
* consists of making sure it has a lbry:// prefix) */
uri.normalizeLbryUri = function(lbryUri) {
return uri.buildLbryUri(uri.parseLbryUri(lbryUri));
}
export default uri;