(obj: JsonValue | any)
| 4 | import { T, Tagged } from './effect/index.js' |
| 5 | |
| 6 | export const hashObject = (obj: JsonValue | any): T.Effect<unknown, HashError, string> => { |
| 7 | return T.tryCatchPromise( |
| 8 | () => xxhash64(stringifyIfNeeded(obj)), |
| 9 | (error) => new HashError({ error }), |
| 10 | ) |
| 11 | } |
| 12 | |
| 13 | export class HashError extends Tagged('HashError')<{ |
| 14 | readonly error: unknown |
no test coverage detected
searching dependent graphs…