query
On this page

hasAttr

builtins.hasAttr

Primop
Docs pulled from | This Revision | about 9 hours ago

Takes 2 arguments

s, set


hasAttr returns true if set has an attribute named s, and false otherwise. This is a dynamic version of the ? operator, since s is an expression rather than an identifier.

This function is not defined in a .nix file. It is likely a builtins function or an alias of a builtins function. builtins functions are predefined functions provided by Nix.

Noogle also knows

Aliases
Detected Type
hasAttr :: String -> AttrSet -> Bool