mirror of
https://github.com/khairul169/code-share.git
synced 2025-04-29 00:59:37 +07:00
12 lines
282 B
TypeScript
12 lines
282 B
TypeScript
import { FileSchema } from "~/server/db/schema/file";
|
|
import { transformJs } from "~/server/lib/transform-js";
|
|
|
|
export const serveJs = async (file: FileSchema) => {
|
|
let content = file.content || "";
|
|
|
|
// transform js
|
|
content = await transformJs(content);
|
|
|
|
return content;
|
|
};
|