mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-09-19 20:09:01 +02:00
lib.hasAttrByPath: fix typo (#302042)
This commit is contained in:
parent
05eeb695b2
commit
5bcb08ea03
|
@ -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 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
|
```nix
|
||||||
(x?a.b) == hasAttryByPath ["a" "b"] x
|
(x?a.b) == hasAttrByPath ["a" "b"] x
|
||||||
# and
|
# and
|
||||||
(x?${f p}."example.com") == hasAttryByPath [ (f p) "example.com" ] x
|
(x?${f p}."example.com") == hasAttrByPath [ (f p) "example.com" ] x
|
||||||
```
|
```
|
||||||
|
|
||||||
**Laws**:
|
**Laws**:
|
||||||
|
|
Loading…
Reference in a new issue