Generates a hash for the given function using a simple string-based hashing algorithm.

Parameters:
NameTypeDescription
fnfunction

The function to be hashed.

Since
  • 3.2.1
Returns:

A string prefixed with 'orf_' followed by the hash value of the input function.

Type: 
string
Example
const myFunction = function() { console.log('Hello'); };
const hash = hashFunction(myFunction);
console.log(hash); // Outputs something like 'orf_12345678'