feat(lib): lua namespace for conversion helpers

This commit is contained in:
NotAShelf 2023-04-18 02:01:45 +03:00
commit 8658ea13a2
No known key found for this signature in database
GPG key ID: F0D14CCB5ED5AA22
4 changed files with 14 additions and 9 deletions

12
lib/lua.nix Normal file
View 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}'";
}