npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@uuki/schemable-validator-client

v0.12.1

Published

Client-side validation library for schemable-validator JSON Schema output. No transport, no framework.

Readme

@uuki/schemable-validator-client

Client-side validation library for schemable-validator JSON Schema output.

Adapter coverage

Both adapters convert the JSON Schema output of SchemaBuilder::toJsonSchema() into native schemas.
Coverage is measured against the 19 mappable rules in RuleMapper.php (fileExt is excluded by the PHP side via x-unmapped-fields).

Zod (v4)

| Rule | JSON Schema field | Supported | |---|---|:---:| | string | type: 'string' | ✅ | | integer | type: 'integer' | ✅ | | number | type: 'number' | ✅ | | boolean | type: 'boolean' | ✅ | | nullable() | type: ['X', 'null'] | ✅ | | length | minLength / maxLength | ✅ | | min / max | minimum / maximum | ✅ | | email | format: 'email' | ✅ | | url | format: 'uri' | ✅ | | date | format: 'date' | ✅ | | dateTime | format: 'date-time' | ✅ | | time | format: 'time' | ✅ | | uuid | format: 'uuid' | ✅ | | ipv4 | format: 'ipv4' | ✅ | | ipv6 | format: 'ipv6' | ✅ | | pattern | pattern | ✅ | | slug | pattern: '^[a-z0-9]+...' | ✅ | | in | enum | ✅ | | ArraySchema | type: 'array' + items / minItems / maxItems | ✅ | | domain | format: 'hostname' | ⚠️ |

18 / 19 — 94.7%

hostname has no Zod built-in. Handle it via onUnknown:

import { toZodSchema } from '@uuki/schemable-validator-client/zod'
import { z } from 'zod'

const schema = toZodSchema(jsonSchema, {
  onUnknown: (key, field) => {
    if (field.format === 'hostname') return z.string().regex(/^[a-z0-9.-]+$/)
    throw new Error(`[zod] unsupported field "${key}": ${JSON.stringify(field)}`)
  },
})

Valibot (v1)

| Rule | JSON Schema field | Supported | |---|---|:---:| | string | type: 'string' | ✅ | | integer | type: 'integer' | ✅ | | number | type: 'number' | ✅ | | boolean | type: 'boolean' | ✅ | | nullable() | type: ['X', 'null'] | ✅ | | length | minLength / maxLength | ✅ | | min / max | minimum / maximum | ✅ | | email | format: 'email' | ✅ | | url | format: 'uri' | ✅ | | date | format: 'date' | ✅ | | dateTime | format: 'date-time' | ✅ | | time | format: 'time' | ✅ | | uuid | format: 'uuid' | ✅ | | ipv4 | format: 'ipv4' | ✅ | | ipv6 | format: 'ipv6' | ✅ | | pattern | pattern | ✅ | | slug | pattern: '^[a-z0-9]+...' | ✅ | | in | enum | ✅ | | ArraySchema | type: 'array' + items / minItems / maxItems | ✅ | | domain | format: 'hostname' | ⚠️ |

18 / 19 — 94.7%

hostname has no Valibot built-in. Handle it via onUnknown:

import { toValibotSchema } from '@uuki/schemable-validator-client/valibot'
import * as v from 'valibot'

const schema = toValibotSchema(jsonSchema, {
  onUnknown: (key, field) => {
    if (field.format === 'hostname') return v.pipe(v.string(), v.regex(/^[a-z0-9.-]+$/))
    throw new Error(`[valibot] unsupported field "${key}": ${JSON.stringify(field)}`)
  },
})

onUnknown behaviour

All adapter functions accept an onUnknown option that controls what happens when an unsupported field is encountered.

| Value | Development (NODE_ENV !== 'production') | Production (NODE_ENV === 'production') | |---|---|---| | 'warn' | console.warn + fall back to unknown | same | | 'throw' | throw | throw | | (key, field) => Schema | call the function | same | | (default) | 'warn' | 'throw' |

The default resolves automatically from process.env.NODE_ENV, which bundlers (Vite, webpack) replace with a string literal at build time.

checkZodSchema / checkValibotSchema

Dry-run functions that return a coverage report without throwing. Useful for fetch-based workflows where the schema is not known until runtime.

import { checkZodSchema } from '@uuki/schemable-validator-client/zod'

const report = checkZodSchema(jsonSchema)
// { supported: ['name', 'email'], unsupported: [{ key: 'host', field: {...}, reason: '...' }] }

if (report.unsupported.length) {
  console.warn('[schemable] unsupported fields:', report.unsupported)
}