MCPcopy Create free account
hub / github.com/compiler-explorer/compiler-explorer / objectToHashableString

Function objectToHashableString

lib/utils.ts:376–379  ·  view source on GitHub ↗

* * @param {*} object * @returns {string}

(object: CacheableValue)

Source from the content-addressed store, hash-verified

374 * @returns {string}
375 */
376function objectToHashableString(object: CacheableValue): string {
377 // See https://stackoverflow.com/questions/899574/which-is-best-to-use-typeof-or-instanceof/6625960#6625960
378 return typeof object === 'string' ? object : JSON.stringify(object);
379}
380
381const DefaultHash = 'Compiler Explorer Default Version 1';
382

Callers 2

getBinaryHashFunction · 0.85
getHashFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected