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

@kiwa-lab/form

v2.1.0

Published

Form validation + submit mock harness for kiwa — React Hook Form / Zod / Formik / Conform を統一 interface で叩ける in-process mock。 schema validate / field register / submit / error 取得までを real provider と同じ signature で書ける test infra。

Downloads

31

Readme

@kiwa-lab/form

Form validation + submit mock harness for kiwa — React Hook Form / Zod / Formik / Conform を統一 interface で in-process から叩ける test infra。

Installation

pnpm add -D @kiwa-lab/form
# or
npm install -D @kiwa-lab/form
# or
yarn add -D @kiwa-lab/form

Supported providers

| Provider | Status | Validate integration | |---|---|---| | React Hook Form | ✅ Ready | resolver 経由 | | Zod | ✅ Ready | schema.parse | | Formik | ✅ Ready | validationSchema | | Conform | ✅ Ready | parseWithZod |

Quick start

import { describe, expect, it } from 'vitest';
import {
  createFormClient,
  validateSchema,
  submitForm,
} from '@kiwa-lab/form';

describe('signup form', () => {
  it('invalid email で validate 失敗、 valid で submit 成功', async () => {
    const client = createFormClient({ provider: 'zod' });
    const schema = { email: { type: 'email' }, password: { min: 8 } };
    const bad = validateSchema(schema, { email: 'x', password: '123' });
    expect(bad.ok).toBe(false);
    const good = await submitForm(client, {
      schema,
      values: { email: '[email protected]', password: '12345678' },
      onSubmit: async (v) => ({ id: 'u-1', ...v }),
    });
    expect(good.result.id).toBe('u-1');
  });
});

API reference

  • createFormClient({ provider: FormProvider }): FormClient — provider 別 mock client
  • validateSchema(schema: SchemaLike, values: Record<string, unknown>): ValidateResult — 統一 shape 検証
  • submitForm(client, options: SubmitFlowOptions): Promise<SubmitResult> — validate → onSubmit → 結果集約
  • registerField(client, field: FieldRegistration): void — field-level 登録
  • getFieldError(client, name: string): FieldError | undefined — field 別 error 取得

Test integration

vitest + /kiwa-form skill で React コンポーネント render なしで validation ロジックだけを高速に verify。

License

UNLICENSED — see github.com/cardene777/kiwa.