Skip to content
Source
Sign inSign up
TanStack/router
Open History to see the last commit

utils.ts

14 lines452 Bytes

1export function resolveViteId(id: string) {
2 return `\0${id}`
3}
4​
5export function createLogger(prefix: string) {
6 const label = `[${prefix}]`
7 return {
8 log: (...args: any) => console.log(label, ...args),
9 debug: (...args: any) => console.debug(label, ...args),
10 info: (...args: any) => console.info(label, ...args),
11 warn: (...args: any) => console.warn(label, ...args),
12 error: (...args: any) => console.error(label, ...args),
13 }