SHIFT + D

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
key
any
yes
The key to check for.
options
Object
no
Options to customize the behavior of the has function. See the Options section for more guidance.

Options

Option
Type
Default
Description
predicateKey
Function
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.

array formatassociative array keys

Edit doc on GitHub

ON THIS PAGE

associative array hasCreate hasOptions