1.0.0-4 • Published 2 years ago
@sturlen/open5e v1.0.0-4
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/open5epnpm install @sturlen/open5eUsage
import { Open5e } from "@sturlen/open5e"
// Initialize
const api = Open5e()
// Query
const dragons = await api.monsters.findMany({
limit: 50,
document__slug: "tob",
search: "dragon",
})
// Use
dragons.forEach((monster) => console.log(monster.name))