Closures

getfunctionhash

Returns a hash representing a function bytecode body when available.

Syntax

getfunctionhash(func: function): string

Arguments

NameTypeDescription
funcfunctionFunction whose bytecode hash is requested.

Returns

NameTypeDescription
hashstringHash string, or nil when hashing is unavailable.

Description

Returns a hash representing a function bytecode body when available.

Call it with 1 parameter(s): func. The argument table explains which values are required and which ones only refine the behavior.

It returns hash (string). Use the returns table to separate successful values from nil results and recoverable errors.

Example

Example call with placeholder values.

local result = getfunctionhash(function() end)
print(result)