Generates a hash for the given function using a simple string-based hashing algorithm.
Parameters:
Name | Type | Description |
---|---|---|
fn | function | The function to be hashed. |
- Since
- 3.2.1
- Source
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'