A11yWatch/a11ywatch-core

View on GitHub
src/core/utils/hash.ts

Summary

Maintainability
A
0 mins
Test Coverage
import { createHash } from "crypto";

export const hashString = (target: string | number) => {
  const hash = createHash("sha256");
  hash.update(target + "");

  return hash.digest("hex");
};