summaryrefslogtreecommitdiff
path: root/src/utils.mjs
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils.mjs')
-rw-r--r--src/utils.mjs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/utils.mjs b/src/utils.mjs
index cde6934..30a0f1a 100644
--- a/src/utils.mjs
+++ b/src/utils.mjs
@@ -82,3 +82,5 @@ export const partial = (fn, ...startArgs) =>
fn(...startArgs, ...endArgs);
export const strSortFn = (a, b) => a.localeCompare(b, "POSIX");
+
+export const undefinedAsNull = x => x === undefined ? null : x;