associative array has
Updated on August 22, 2024Source codeTests
createAssociativeArrayHas is a pipe that transforms an associative array to a boolean indicating whether or not the associative array has a given key.
Create has
Call createAssociativeArrayHas with these parameters to create your has function:
Parameter
Type
Required
Description
keyany
yes
The key to check for.
optionsObject
no
Options to customize the behavior of the
has function. See the Options section for more guidance.Options
Option
Type
Default
Description
predicateKeyFunction
Strict equality check
A function that accepts a key and returns a boolean indicating whether or not the key matches the one you're looking for.