lib/baseURL.js
function encode (bits) {
  if (!bitString.isValid(bits)) throw new Error('baseURL#encode: bits not valid bitstring');
  if (bits.length % 6 !== 0) throw new Error('baseURL#encode: bits must be a multiple of 6');

  var result = '';
  for (var i = 0; i < bits.length; i = i + 6) {
    result += getChar(bits.slice(i, i + 6 ));
  }
  return result;
}
function encode (bits) {
  if (!bitString.isValid(bits)) throw new Error('baseURL#encode: bits not valid bitstring');
  if (bits.length % 6 !== 0) throw new Error('baseURL#encode: bits must be a multiple of 6');

  var result = '';
  for (var i = 0; i < bits.length; i = i + 6) {
    result += getChar(bits.slice(i, i + 6 ));
  }
  return result;
}
function encode ( bits ) { if ( ! bitString . isValid ( bits ) ) throw new Error ( 'baseURL#encode: bits not valid bitstring' ) ; if ( bits . length % 6 !== 0 ) throw new Error ( 'baseURL#encode: bits must be a multiple of 6' ) ; var result = '' ; for ( var i = 0 ; i < bits . length ; i = i + 6 ) { result += getChar ( bits . slice ( i , i + 6 ) ) ; } return result ; }
Encode a mod 6 bitstring into a baseURL string
@param  {string} bits A mod 6 bitstring
@return {string}      baseURL encoded string
Encode a mod 6 bitstring into a baseURL string