Small cleanups

This commit is contained in:
Zoe Roux 2024-11-15 18:03:16 +01:00
parent 47729d8373
commit d6cae5ace1
No known key found for this signature in database
4 changed files with 8 additions and 15 deletions

Binary file not shown.

View File

@ -1,7 +0,0 @@
import { db } from "./db";
import { videos } from "./db/schema/videos";
import { Video } from "./models/video";
const seed = async () =>{
db.insert(videos).values(Video.examples)
};

View File

@ -1,3 +1,3 @@
// remove indent in multi-line comments
export const comment = (str: TemplateStringsArray) =>
str.toString().replace(/^\s+/gm, "");
export const comment = (str: TemplateStringsArray, ...values: any[]) =>
str.reduce((acc, str, i) => `${acc}${str}${values[i]}`).replace(/^\s+/gm, "");