function multibase(nameOrCode, buf) {
        if (!buf) {
          throw new Error("requires an encoded Uint8Array");
        }
        const { name, codeBuf } = encoding(nameOrCode);
        validEncode(name, buf);

        return concat([codeBuf, buf], codeBuf.length + buf.length);
      }
/**
       * Create a new Uint8Array with the multibase varint+code.
       *
       * @param {BaseNameOrCode} nameOrCode - The multibase name or code number.
       * @param {Uint8Array} buf - The data to be prefixed with multibase.
       * @returns {Uint8Array}
       * @throws {Error} Will throw if the encoding is not supported
       */
Create a new Uint8Array with the multibase varint+code.
@param {BaseNameOrCode} nameOrCode - The multibase name or code number.
@param {Uint8Array} buf - The data to be prefixed with multibase.
@returns {Uint8Array}
@throws {Error} Will throw if the encoding is not supported
Create a new Uint8Array with the multibase varint + code . @param { BaseNameOrCode } nameOrCode - The multibase name or code number . @param { Uint8Array } buf - The data to be prefixed with multibase . @returns { Uint8Array } @throws { Error } Will throw if the encoding is not supported
function multibase(nameOrCode, buf) {
        if (!buf) {
          throw new Error("requires an encoded Uint8Array");
        }
        const { name, codeBuf } = encoding(nameOrCode);
        validEncode(name, buf);
        return concat([codeBuf, buf], codeBuf.length + buf.length);
      }
function multibase ( nameOrCode , buf ) { if ( ! buf ) { throw new Error ( "requires an encoded Uint8Array" ) ; } const { name , codeBuf } = encoding ( nameOrCode ) ; validEncode ( name , buf ) ; return concat ( [ codeBuf , buf ] , codeBuf . length + buf . length ) ; }
Create a new Uint8Array with the multibase varint+code.
Create a new Uint8Array with the multibase varint + code .