1.0.0-6 • Published 2 years ago

@sturlen/open5e v1.0.0-6

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Makes working with Open5e data in Typescript a breeze. All data is validated using Zod schemas, which gives you great autocomplete and runtime safety.

Install

npm install @sturlen/open5e
pnpm install @sturlen/open5e

Usage

import { Open5e } from "@sturlen/open5e"

// Query
const dragons = await Open5e.monsters.findMany({
    limit: 50,
    document__slug: "tob",
    search: "dragon",
})

// Use
dragons.forEach((monster) => console.log(monster.name))

// You can access the schemas and use them separately
Ope5e.monsters.schema.parse(YourObject)

References

Open5e Site Open5e API

1.0.0-6

2 years ago

1.0.0-5

2 years ago

1.0.0-4

2 years ago

1.0.0-1

2 years ago

1.0.0-3

2 years ago

1.0.0-2

2 years ago

1.0.0-0

2 years ago

0.0.2-1

2 years ago

0.0.2-0

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago

0.0.0

2 years ago