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

@pbkware/fielded-text-web

v0.1.2

Published

A parser/generator library based on Fielded Text.

Readme

Fielded Text TypeScript Library (for web)

NPM version License

This library allows you to parse and generate CSV like text data in manner similar to reading and writing from/to databases. It does this by associating a schema (called Meta) with the text data.

How it works

The structure of this meta/schema is specified by the proposed Fielded Text standard. Note that this standard is not limited to CSV data but handles a wide variety of text data where lines consist of field values. For example it can also be used with lines having fixed width fields and also with lines containing different fields based on the value of key fields.

Below is a very simple parsing example:

import { FtReader, FtXmlMetaSerialization } from "@pbkware/fielded-text-web";

// CSV data to be read
const csvData = `Name,Age
John Doe,30
Jane Smith,25`;

// Meta describing the schema of the CSV data
const xmlMeta = `<?xml version="1.0" encoding="utf-8"?>
<FieldedText HeadingLineCount="1">
  <Field Name="Name"/>
  <Field Name="Age" DataType="Integer"/>
</FieldedText>`;

// Load meta data from XML
const metaReader = new FtXmlMetaSerialization();
const meta = metaReader.deserialize(xmlMeta);

const reader = new FtReader(meta, csvData);

// Read and log the data
while (reader.read()) {
  console.log(
    reader.fieldList.get(0).asString,
    reader.fieldList.get(1).asBigInt,
  );
}

Installation

npm install @pbkware/fielded-text-web

More information

Examples

The examples directory in the source repository contains practical demonstrations:

| Example | Description | | ---------------------------------------------------------------- | ----------------------------------------------- | | basic-read-build-meta | Read CSV by building metadata in code | | basic-read-load- meta | Read CSV by loading XML metadata | | basic-write | Write CSV with automatic quoting | | build-meta-with-sequences | Build metadata for files with sequences | | count-records | Efficiently count records without reading data | | read-events | Use event hooks during reading | | read-sequence | Read files with sequences (conditional fields) | | read-sequence-ordinal | Read sequences using ordinals for performance | | sequences-with-readback | Work with repeating groups | | write-comments | Add comment lines to output | | write-declared | Create files with declaration headers | | write-events | Use event hooks during writing | | write-headings | Write heading lines | | write-sequence | Write files with sequences (conditional fields) | | write-sequence-events | Write sequences using event-driven approach |

Running Examples

From within the examples directory:

# Run all examples
npm run all

# Run individual example
npm run basic-write