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

@ejunior95/formai-core

v0.1.1

Published

O motor agnóstico do formAI que gera configurações de formulário a partir de prompts de IA.

Readme

@ejunior95/formai-core 🤖

NPM Version License: MIT

The headless, framework-agnostic engine for AI-powered form generation.

This is the core library that powers the formAI ecosystem. It contains the essential logic for communicating with the formAI API, fetching AI-generated field configurations, and validating values.

Why formAI?

Stop wasting time hunting for validation regex, memorizing mask patterns, or manually building complex validation logic.

formAI lets you build forms by simply describing what you want in plain English.

  • You write: "A required Brazilian phone number"
  • You get:
    {
      "type": "mask-text",
      "mask": "(00) 00000-0000",
      "placeholder": "(00) 00000-0000",
      "validation": {
        "required": true,
        "regex": "^\\(\\d{2}\\)\\s\\d{5}-\\d{4}$",
        "minLength": 15,
        "maxLength": 15
      }
    }

Installation

npm install @ejunior95/formai-core

How to Use (Core Engine)

This package is "headless" and intended to be used by framework adapters (like @ejunior95/formai-react). However, you can use it directly in any JavaScript project.

import { getFieldConfig, validateValue } from '@ejunior95/formai-core';

// 1. Fetch the configuration from the AI
const config = await getFieldConfig(
  "A required email field", // The prompt
  {
    maskPatterns: { digit: '0', letter: 'a' } // Your library's mask definitions
  }
);

/*
config = {
  type: 'text',
  placeholder: '[email protected]',
  mask: null,
  validation: {
    required: true,
    regex: '^[\\w-\\.]+@([\\w-]+\\.)+[\\w-]{2,4}$',
    ...
  }
}
*/

// 2. Use the pure validator
const error = validateValue("test@", config);
// error = "Invalid format."

const success = validateValue("[email protected]", config);
// success = null

API

getFieldConfig(prompt: string, options?: FormAIOptions)
  • prompt: The natural language description (e.g., "a 5-digit postal code").
  • options:(Optional) An optional object.
  • maskPatterns:

    • digit: The character your mask library uses for digits (e.g., '0').
    • letter: The character your mask library uses for letters (e.g., 'a').
validateValue(value: string, config: FormAIConfig)
  • value: The current value of the input.
  • config: The FormAIConfig object returned from getFieldConfig.

Returns null if valid, or an string with the error message if invalid.

Framework Adapters

This package is just the engine. For easy integration, use one of our official adapters:

  • ⚛️ React: npm install @ejunior95/formai-react (Available Now!)
  • 🅰️ Angular: Coming Soon!
  • 💚 Vue: Coming Soon!