first commit

This commit is contained in:
2026-01-17 14:17:42 +05:30
commit 0f194eb9e7
328 changed files with 73544 additions and 0 deletions

37
lib/utils.ts Normal file
View File

@@ -0,0 +1,37 @@
import { type ClassValue, clsx } from 'clsx';
import { twMerge } from 'tailwind-merge';
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs));
}
export function formatCurrency(amount: number) {
return new Intl.NumberFormat('en-IN', {
style: 'currency',
currency: 'INR',
}).format(amount);
}
export function formatDate(date: string | Date) {
return new Date(date).toLocaleDateString('en-IN', {
year: 'numeric',
month: 'long',
day: 'numeric',
});
}
export function generateSlug(text: string) {
return text
.toLowerCase()
.replace(/[^\w ]+/g, '')
.replace(/ +/g, '-');
}
export function generateSKU() {
return (
'SKU-' +
Date.now() +
'-' +
Math.random().toString(36).substr(2, 9).toUpperCase()
);
}