chore: Do the migrations

This commit is contained in:
BluJ
2023-04-24 15:52:43 -06:00
parent 75ec297be1
commit 50cfc7aa43
19 changed files with 167 additions and 98 deletions

View File

@@ -17,6 +17,7 @@ export { FileHelper } from "./fileHelper";
export { getWrapperData } from "./getWrapperData";
export { deepEqual } from "./deepEqual";
export { deepMerge } from "./deepMerge";
export { once } from "./once";
/** Used to check if the file exists before hand */
export const exists = (

9
lib/util/once.ts Normal file
View File

@@ -0,0 +1,9 @@
export function once<B>(fn: () => B): () => B {
let result: [B] | [] = [];
return () => {
if (!result.length) {
result = [fn()];
}
return result[0];
};
}