MCPcopy
hub / github.com/vercel/hyper / stringify

Function stringify

bin/yarn-standalone.js:26364–26372  ·  view source on GitHub ↗
(obj, opts)

Source from the content-addressed store, hash-verified

26362
26363module.exports.stringify = stringify
26364function stringify (obj, opts) {
26365 if (obj.algorithm && obj.digest) {
26366 return Hash.prototype.toString.call(obj, opts)
26367 } else if (typeof obj === 'string') {
26368 return stringify(parse(obj, opts), opts)
26369 } else {
26370 return Integrity.prototype.toString.call(obj, opts)
26371 }
26372}
26373
26374module.exports.fromHex = fromHex
26375function fromHex (hexDigest, algorithm, opts) {

Callers 3

concatMethod · 0.85
parseFunction · 0.85
yarn-standalone.jsFile · 0.85

Calls 8

_stringifyFunction · 0.85
_load_constantsFunction · 0.85
_load_packageFunction · 0.85
serializerFunction · 0.85
concatMethod · 0.80
parseFunction · 0.70
filterFunction · 0.70
pushMethod · 0.45

Tested by

no test coverage detected