MCPcopy Create free account
hub / github.com/Kudo/react-native-v8 / createHash

Function createHash

plugin/src/generateCode.ts:139–143  ·  view source on GitHub ↗
(src: string)

Source from the content-addressed store, hash-verified

137}
138
139export function createHash(src: string): string {
140 // this doesn't need to be secure, the shorter the better.
141 const hash = crypto.createHash('sha1').update(src).digest('hex');
142 return `sync-${hash}`;
143}
144
145export function findLastIndex<T>(array: T[], finder: (element: T) => unknown): number {
146 for (let i = array.length - 1; i >= 0; --i) {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected