nixAttrSet
import { nixAttrSet } from "https://garn.io/ts/v0.0.16/nix.ts";
Turns a javascript object of NixExpression
s into a Nix attribute set.
Filters out undefined values.
Example:
// returns the Nix expression `{ "a" = 1; "b" = 2; }`
nixAttrSet({
a: nixRaw`1`,
b: nixRaw`2`,
c: undefined,
})
§
nixAttrSet(attrSet: Record<string, NixExpression | undefined>): NixExpression
[src]§Parameters
§
attrSet: Record<string, NixExpression | undefined>
[src]