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

@orkestrel/form

v0.0.16

Published

The @orkestrel/form package.

Readme

@orkestrel/form

The environment-agnostic form document: a FormSchema stating what is asked, a Form holding the answers given against it, declarative FieldRule data stating what those answers must satisfy, acknowledged editing, and a terminal submit that settles the form exactly once.

A terminal prompt and a browser form ask the same thing in different places, so the core ships what they share. The browser entry binds native controls and renders neutral feedback. Its answer promise is the parking seam a server needs: hand the document out, wait, receive the answers back. A live form can take a field out and put it back with disable and enable, and exported budgets bound what one schema and its answers may retain, so a document that arrives from a wire costs a known maximum before anything decides to trust it. Built on @orkestrel/contract and @orkestrel/emitter, and part of the @orkestrel line.

Install

npm install @orkestrel/form

Requirements

  • Node.js >= 22.18
  • Host-independent: no node:*, no DOM. Ships dual ESM+CJS builds.

Usage

Declare what is asked, answer it, and settle it once:

import { createForm } from '@orkestrel/form'

const form = createForm({
	label: 'Sign up',
	fields: [
		{ control: 'text', name: 'email', label: 'Email', rule: { required: true, email: true } },
		{
			control: 'password',
			name: 'secret',
			label: 'Password',
			rule: { required: true, minimum: 12 },
		},
		{ control: 'confirm', name: 'terms', label: 'I accept the terms', rule: { required: true } },
	],
})

// A task somewhere else parks on the answer.
const parked = form.answer

form.fill({ email: '[email protected]', secret: 'correct horse battery' })
form.errors // [{ field: 'terms', message: 'This field is required', rule: 'required' }]

form.fill('terms', true)
const result = form.submit()
result.success // true

await parked // { email: '[email protected]', secret: 'correct horse battery', terms: true }

Guide

See guides/form.md for the documented surface — the controls and their value shapes, the rule table and the custom cross-field seam, the presence model behind required, the lifecycle and its events, taking a field out of a live form with disable and enable, the budgets that bound what a schema and its answers may retain, the serialize/parse wire boundary, and the concept inventory of what this package leaves to the layer above.

Package

The . entry ships the host-independent core in ESM and CJS. The ./browser entry ships the native binding in ESM. Both include declarations. The binding supports password reveal, rule messages without duplicate native feedback, presented-control write notifications and touch, and optional blur deferral through footer presses. See Native binding.

Use control: 'list' for free-text tags or recipient arrays. Its required rule requires an entry, minimum and maximum count entries, and email: true checks each address. Bind it to a native select multiple for repeated FormData values and authored-option reset. See List fields.

Development

npm install
npm test

License

MIT © Orkestrel — see LICENSE.