renovate/lib/util/fingerprint.ts

8 lines
239 B
TypeScript

import { hash } from './hash';
import { safeStringify } from './stringify';
export function fingerprint(input: unknown): string {
const stringifiedInput = safeStringify(input);
return stringifiedInput ? hash(stringifiedInput) : '';
}