@svuick/time
TypeScript icon, indicating that this package has built-in type declarations

0.0.5 • Public • Published

@svuick/time

npm (scoped)

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.

Package Sidebar

Install

npm i @svuick/time

Weekly Downloads

1

Version

0.0.5

License

MIT

Unpacked Size

7.77 kB

Total Files

10

Last publish

Collaborators

  • davidplugge