Skip to content

Instantly share code, notes, and snippets.

View navin-moorthy's full-sized avatar
💻
Focused

Navin Moorthy navin-moorthy

💻
Focused
View GitHub Profile
@navin-moorthy
navin-moorthy / cn.ts
Last active August 30, 2023 15:10
React Utils
import { twMerge, type ClassNameValue } from "tailwind-merge";
export function cn(...inputs: ClassNameValue[]) {
return twMerge(inputs);
}
@navin-moorthy
navin-moorthy / asyncWrapper.ts
Last active November 28, 2023 12:03
Node Utils
import { type NextFunction, type Request, type Response } from "express";
export type AsyncHandler = (
request: Request,
response: Response,
next: NextFunction,
) => Promise<void>;
/**
* Wraps an asynchronous route handler function with error handling middleware.