feat: Worked with matt to create all the things

This commit is contained in:
BluJ
2023-03-02 13:25:07 -07:00
parent de043ddd9e
commit 19504ef559
38 changed files with 990 additions and 1160 deletions

10
lib/util/nullIfEmpty.ts Normal file
View File

@@ -0,0 +1,10 @@
/**
* A useful tool when doing a getConfig.
* Look into the config {@link FileHelper} for an example of the use.
* @param s
* @returns
*/
export default function nullIfEmpty(s: null | Record<string, unknown>) {
if (s === null) return null;
return Object.keys(s).length === 0 ? null : s;
}