mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-09-06 10:21:31 +00:00
feat(lib): lua namespace for conversion helpers
This commit is contained in:
parent
58f7d8b62e
commit
8658ea13a2
4 changed files with 14 additions and 9 deletions
12
lib/lua.nix
Normal file
12
lib/lua.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
# Helpers for converting values to lua
|
||||
{lib}: {
|
||||
yesNo = value:
|
||||
if value
|
||||
then "yes"
|
||||
else "no";
|
||||
|
||||
nullString = value:
|
||||
if value == null
|
||||
then "nil"
|
||||
else "'${value}'";
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue