lib.hasAttrByPath: fix typo (#302042)

This commit is contained in:
Tharun Thennarasu 2024-04-06 14:54:44 +05:30 committed by GitHub
parent 05eeb695b2
commit 5bcb08ea03
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -87,9 +87,9 @@ rec {
Nix has a [has attribute operator `?`](https://nixos.org/manual/nix/stable/language/operators#has-attribute), which is sufficient for such queries, as long as the number of attributes is static. For example:
```nix
(x?a.b) == hasAttryByPath ["a" "b"] x
(x?a.b) == hasAttrByPath ["a" "b"] x
# and
(x?${f p}."example.com") == hasAttryByPath [ (f p) "example.com" ] x
(x?${f p}."example.com") == hasAttrByPath [ (f p) "example.com" ] x
```
**Laws**: