chore: fmt

This commit is contained in:
2026-03-27 22:51:04 +07:00 Unverified
parent 9fafbb1d7a
commit ff6800bfd0
4 changed files with 26 additions and 22 deletions
+4 -1
View File
@@ -4,7 +4,10 @@ type Feather = [number, number, number, number];
export async function featherImage( export async function featherImage(
input: ArrayBuffer, input: ArrayBuffer,
{ passes = [[0, 0.3, 0, 0]], ratio = 1 }: { passes: Feather[], ratio?: number }, {
passes = [[0, 0.3, 0, 0]],
ratio = 1,
}: { passes: Feather[]; ratio?: number },
) { ) {
const img = await loadImage(Buffer.from(input)); const img = await loadImage(Buffer.from(input));
+1 -1
View File
@@ -1,4 +1,4 @@
export function TalentSvg({tw}: {tw?: string}) { export function TalentSvg({ tw }: { tw?: string }) {
return ( return (
<svg <svg
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
+20 -19
View File
@@ -16,15 +16,13 @@ const colors = [
"blueBright", "blueBright",
"magentaBright", "magentaBright",
"cyanBright", "cyanBright",
"whiteBright" "whiteBright",
]; ];
var i = 0; var i = 0;
if (!feature("API")) if (!feature("API"))
console.log( console.log(
colors colors.map((c, i) => styleText(c, (i + 10).toString(36))).join(""),
.map((c, i) => styleText(c, (i + 10).toString(36)))
.join(""),
); );
export function createLogger(label?: string) { export function createLogger(label?: string) {
@@ -32,21 +30,24 @@ export function createLogger(label?: string) {
const col = colors[i]; const col = colors[i];
i = (i + 1) % colors.length; i = (i + 1) % colors.length;
return function log(strings: TemplateStringsArray, ...values: unknown[]) { return function log(strings: TemplateStringsArray, ...values: unknown[]) {
const normalized = styleText(col, `${(label ?? `${Date.now() - start}ms`).padStart(7)} | ${strings const normalized = styleText(
.reduce( col,
(out, str, i) => `${(label ?? `${Date.now() - start}ms`).padStart(7)} | ${strings
out + .reduce(
str + (out, str, i) =>
(typeof values[i] === "string" out +
? values[i] str +
: typeof values[i] !== "undefined" (typeof values[i] === "string"
? inspect(values[i]) ? values[i]
: ""), : typeof values[i] !== "undefined"
"", ? inspect(values[i])
) : ""),
.split("\n") "",
.map((l, i) => (i ? `${" ".repeat(7)} | ${l}` : l)) )
.join("\n")}\n`); .split("\n")
.map((l, i) => (i ? `${" ".repeat(7)} | ${l}` : l))
.join("\n")}\n`,
);
console.write(normalized); console.write(normalized);
}; };
} }