MCPcopy Index your code
hub / github.com/vercel/hyper / pickAlgorithm

Method pickAlgorithm

bin/yarn-standalone.js:26318–26329  ·  view source on GitHub ↗
(opts)

Source from the content-addressed store, hash-verified

26316 ) || false
26317 }
26318 pickAlgorithm (opts) {
26319 const pickAlgorithm = (opts && opts.pickAlgorithm) || getPrioritizedHash
26320 const keys = Object.keys(this)
26321 if (!keys.length) {
26322 throw new Error(`No algorithms available for ${
26323 JSON.stringify(this.toString())
26324 }`)
26325 }
26326 return keys.reduce((acc, algo) => {
26327 return pickAlgorithm(acc, algo) || acc
26328 })
26329 }
26330}
26331
26332module.exports.parse = parse

Callers 3

matchMethod · 0.80
checkDataFunction · 0.80
integrityStreamFunction · 0.80

Calls 2

toStringMethod · 0.95
reduceMethod · 0.80

Tested by

no test coverage detected