index.js
function _parseProofs(proofs) {
  if (!_isArray(proofs)) throw new Error('proofs arg must be an Array')
  if (_isEmpty(proofs)) throw new Error('proofs arg must be a non-empty Array')

  let parsedProofs = []

  _forEach(proofs, proof => {
    if (_isObject(proof)) {
      // OBJECT
      parsedProofs.push(cpp.parse(proof))
    } else if (isJSON(proof)) {
      // JSON-LD
      parsedProofs.push(cpp.parse(JSON.parse(proof)))
    } else if (isBase64(proof) || _isBuffer(proof) || _isHex(proof)) {
      // BINARY
      parsedProofs.push(cpp.parse(proof))
    } else {
      throw new Error('unknown proof format')
    }
  })

  return parsedProofs
}
function _parseProofs(proofs) {
  if (!_isArray(proofs)) throw new Error('proofs arg must be an Array')
  if (_isEmpty(proofs)) throw new Error('proofs arg must be a non-empty Array')

  let parsedProofs = []

  _forEach(proofs, proof => {
    if (_isObject(proof)) {
      // OBJECT
      parsedProofs.push(cpp.parse(proof))
    } else if (isJSON(proof)) {
      // JSON-LD
      parsedProofs.push(cpp.parse(JSON.parse(proof)))
    } else if (isBase64(proof) || _isBuffer(proof) || _isHex(proof)) {
      // BINARY
      parsedProofs.push(cpp.parse(proof))
    } else {
      throw new Error('unknown proof format')
    }
  })

  return parsedProofs
}
function _parseProofs ( proofs ) { if ( ! _isArray ( proofs ) ) throw new Error ( 'proofs arg must be an Array' ) if ( _isEmpty ( proofs ) ) throw new Error ( 'proofs arg must be a non-empty Array' ) let parsedProofs = [ ] _forEach ( proofs , proof => { if ( _isObject ( proof ) ) { // OBJECT parsedProofs . push ( cpp . parse ( proof ) ) } else if ( isJSON ( proof ) ) { // JSON-LD parsedProofs . push ( cpp . parse ( JSON . parse ( proof ) ) ) } else if ( isBase64 ( proof ) || _isBuffer ( proof ) || _isHex ( proof ) ) { // BINARY parsedProofs . push ( cpp . parse ( proof ) ) } else { throw new Error ( 'unknown proof format' ) } } ) return parsedProofs }
Parse an Array of proofs, each of which can be in any supported format.

@param {Array} proofs - An Array of proofs in any supported form
@returns {Array} An Array of parsed proofs
Parse an Array of proofs each of which can be in any supported format .