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

form-field-extractor

v1.0.4

Published

The **Form Field Extractor** is a utility package designed to extract, validate, and fill form fields using text input, voice commands, or API-based data extraction. It leverages AI to parse input text and populate form fields accurately, ensuring a seaml

Readme

Form Field Extractor

The Form Field Extractor is a utility package designed to extract, validate, and fill form fields using text input, voice commands, or API-based data extraction. It leverages AI to parse input text and populate form fields accurately, ensuring a seamless user experience for developers and end-users alike.

Features

  • Extract form field IDs and values dynamically from an HTML form.
  • Populate form fields using text or voice inputs.
  • Perform AI-based data extraction and validation via OpenAI API.
  • Supports multiple input types: text, radio buttons, checkboxes, select fields, etc.
  • Offers integration with text-to-speech (TTS) and speech recognition for hands-free form interaction.
  • Error handling for missing fields with visual and auditory feedback.
  • Customizable prompts and multilingual support (English and German).

Installation

You can install the package via npm:

npm install form-field-extractor

Or include it directly from the .tgz files in this repository:

npm install ./form-field-extractor-1.0.2.tgz

Usage

1. Extract and Populate Form Fields via Text

import { fillFormByText } from "form-field-extractor";

const formId = "myForm";
const sourceText = "My name is John Doe, I am 30 years old, born on May 15, 1993.";

fillFormByText(formId, sourceText)
    .then((extractedData) => {
        console.log("Extracted Data:", extractedData);
    })
    .catch((error) => {
        console.error("Error:", error);
    });

2. Populate Form Fields Using Voice Commands

import { fillFormByVoice } from "form-field-extractor";

const formId = "myForm";
const userPrompt = "Please provide your personal details.";
const languageCode = "en"; // 'en' for English, 'de' for German

fillFormByVoice(formId, userPrompt, languageCode, (status) => {
    console.log("Status Update:", status);
})
    .then((mergedData) => {
        console.log("Merged Data:", mergedData);
    })
    .catch((error) => {
        console.error("Error:", error);
    });

API Methods

fillFormByText(formId: string, sourceText: string)

Extracts and populates form fields based on the provided text.

  • Parameters:
    • formId: The ID of the form element.
    • sourceText: The input text containing field data.
  • Returns: An array of extracted form field objects.

fillFormByVoice(formId: string, userPrompt?: string, languageCode?: string, statusCallback?: (status: { isPlaying: boolean; isRecording: boolean }) => void)

Populates form fields via voice input.

  • Parameters:
    • formId: The ID of the form to be filled.
    • userPrompt: A custom prompt for voice input.
    • languageCode: Language for speech recognition (en or de).
    • statusCallback: Callback to receive status updates of the mircrophone to add sound waves in the frontend.
  • Returns: A promise resolving to the merged form data.

Dependencies

  • react-toastify for notifications.

File Structure

├── helper.js          # Core logic for form field extraction and validation
├── index.js           # Entry point for text and voice-based form population
├── index.d.ts         # TypeScript definitions for exported methods
├── package.json       # Package metadata and dependencies
├── .npmignore         # Ignored files for npm packaging
├── form-field-extractor-1.0.1.tgz
└── form-field-extractor-1.0.2.tgz

Development

  1. Clone the repository:

    git clone https://github.com/your-repo/form-field-extractor.git
    cd form-field-extractor
  2. Install dependencies:

    npm install
  3. Run your project or make changes.

License

This project is licensed under the ISC License.