Skip to main content

Built and signed on GitHub Actions

A JavaScript extension package for building strong and modern applications.

This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
This package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
This package works with Browsers
JSR Score
94%
Published
2 weeks ago (1.6.0)

Decorator functions that can be used to validate the input and output of class methods and guarantee type safety at runtime, include param, returns and throws, based on Zod.

Functions

f
param

A decorator that restrains the input arguments of the method at runtime, based on Zod.

f
returns

A decorator that restrains the return value of the method at runtime, based on Zod.

f
throws

A decorator that restrains the thrown value of the method at runtime, based on Zod.

Type Aliases

T
MethodDecorator
No documentation available

Add Package

deno add jsr:@ayonli/jsext

Import symbol

import * as mod from "@ayonli/jsext/class/decorators";

---- OR ----

Import directly with a jsr specifier

import * as mod from "jsr:@ayonli/jsext/class/decorators";

Add Package

npx jsr add @ayonli/jsext

Import symbol

import * as mod from "@ayonli/jsext/class/decorators";

Add Package

yarn dlx jsr add @ayonli/jsext

Import symbol

import * as mod from "@ayonli/jsext/class/decorators";

Add Package

pnpm dlx jsr add @ayonli/jsext

Import symbol

import * as mod from "@ayonli/jsext/class/decorators";

Add Package

bunx jsr add @ayonli/jsext

Import symbol

import * as mod from "@ayonli/jsext/class/decorators";