We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dayjs()
useDayjs()() is an ugly code style in my opinion!
useDayjs()()
console.log(useDayjs()().format('YYYY-MM-DD HH:mm:ss')); // or two lines const dayjs = useDayjs(); console.log(dayjs().format('YYYY-MM-DD HH:mm:ss'));
dayjs() as autoimport!
console.log(dayjs().format('YYYY-MM-DD HH:mm:ss'));
This can certainly be solved more beautifully in the library, but until the feature is available in the library, it can be used as a composable:
export function dayjs(...args: Parameters<ReturnType<typeof useDayjs>>) { return useDayjs()(...args); }
~/composables/dayjs.ts
The text was updated successfully, but these errors were encountered:
Very cool suggestion, feel free to start a PR!
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Current
useDayjs()()
is an ugly code style in my opinion!Feature 🚀
dayjs()
as autoimport!Workarround
This can certainly be solved more beautifully in the library, but until the feature is available in the library, it can be used as a composable:
~/composables/dayjs.ts
The text was updated successfully, but these errors were encountered: