checkInvalidKey
function checkInvalidKey( target, source, sourceName): void;Check that an object does not have any key that is not in a source.
Parameters
Section titled “Parameters”target
Section titled “target”Record<string, any>
The object to check
source
Section titled “source”string[] | Record<string, any>
The valid keys, or the object that holds them
sourceName
Section titled “sourceName”string
The name of the source, used in the error message
Returns
Section titled “Returns”void
Nothing
Throws
Section titled “Throws”DisTubeError When the target is not an object, or when it has an invalid key