src/index.js
function isEncoded (bufOrString) {
  if (Buffer.isBuffer(bufOrString)) {
    bufOrString = bufOrString.toString()
  }

  // Ensure bufOrString is a string
  if (Object.prototype.toString.call(bufOrString) !== '[object String]') {
    return false
  }

  const code = bufOrString.substring(0, 1)
  try {
    const base = getBase(code)
    return base.name
  } catch (err) {
    return false
  }
}
function isEncoded (bufOrString) {
  if (Buffer.isBuffer(bufOrString)) {
    bufOrString = bufOrString.toString()
  }

  // Ensure bufOrString is a string
  if (Object.prototype.toString.call(bufOrString) !== '[object String]') {
    return false
  }

  const code = bufOrString.substring(0, 1)
  try {
    const base = getBase(code)
    return base.name
  } catch (err) {
    return false
  }
}
function isEncoded ( bufOrString ) { if ( Buffer . isBuffer ( bufOrString ) ) { bufOrString = bufOrString . toString ( ) } // Ensure bufOrString is a string if ( Object . prototype . toString . call ( bufOrString ) !== '[object String]' ) { return false } const code = bufOrString . substring ( 0 , 1 ) try { const base = getBase ( code ) return base . name } catch ( err ) { return false } }
Is the given data multibase encoded?

@param {Buffer|string} bufOrString
@returns {boolean}
@memberof Multibase
Is the given data multibase encoded?