@svuick/time
v0.0.5
Published
Downloads
2
Readme
@svuick/time
Install
Install with npm
npm i @svuick/time
Install with pnpm
pnpm i @svuick/time
Install with yarn
yarn add @svuick/time
Setup
src/hooks.ts
import { register } from '@svuick/core/hooks';
import time from '@svuick/time/hooks';
register(time);
export { handle } from '@svuick/core/hooks';
The plugin provides a locale
string in the request locals and session.
Usage
src/routes/api/endpoint.ts
export const get: Svuick.RequestHandler = (request) => {
console.log(request.locals.locale);
return {
body: request.locals.locale
status: 200
};
};
Licence
Licensed under MIT.