Namespace: Util:hash-next

Util:hash-next

Source:

Methods

hash-next($hash, $key) → {*|null}

Retrieves the value of the adjacent, next key in a hash, if one exists. The idea is, to retrieve the next key, based on a current one, to go one step further, which is helpful for things like escalating to the next breakpoint for example.

Parameters:
Name Type Description
$hash Hash

the hash to use

$key String

the current key, from which we want to go to the next

Source:
Returns:
the value of the next key or null if there is none
Type
* | null
Example
hash-next($foo-hash, 'small')
  => value of $foo-hash.medium