h3

up:: Nuxt ⚐

  • Minimal http framework
  • Fast and tree-shakable replacement for Express TK
  • Built in a similar way to composition API

πŸ—„οΈ Utils - h3

Usage in Nuxt

Used in Nitro for

  • server middleware
  • built in utilities used directly in event handlers

getValidatedQuery

export default defineEventHandler((event) => {
  const query = getValidatedQuery(event, (data) => {
    return "key" in data && typeof data.key === "string";
  });
});