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

digital-fdl

v1.0.0

Published

Field Definition Language use to build policy's field types

Readme

FDL

FDL, pronounced "fiddle", is a library developed by Jack Henry's Digital UX team to build complex forms and tables with many interdependent fields and validation rules.

Example: Dog Walking Service

Let's say you're building a scheduling form for your dog walking business. It has four fields: name, date, new customer, and comments, with the following rules:

  • the name can be between 2 and 20 characters and should be capitalized when displayed (regardless of how it's input)
  • new customer is a checkbox radio buttons a checkbox that defaults to "yes" and becomes disabled if the name isn't recognized
  • the date can be any Monday - Friday, excluding holidays, and new customers can only book on Friday
  • comments are optional, unless it's a new customer

Traditionally we would put all of these rules in the HTML template, but that gets hairy quick. Then we try to move some of the business logic to the controller, and it still gets hard to maintain. (We're typically dealing with 10-20 fields with a lot more rules and the business constantly throwing us curve balls).

FDL is a powerful but easy to read domain specific language that corrals all of these business rules so the view code only has to worry about what field goes where.

It looks something like this:

import { string, boolean, date, Record } from "@jack-henry/FDL";

const name = string.with
  .minLength(2)
  .and.maxLength(20)
  .and.formatter(capitalize);
const newCustomer = boolean.with
  .defaultValue(false)
  .thatIs.disabledWhen(isNewCustomer);
const date = date.with
  .validator((record) => isWeekday(record.date))
  .and.validator((record) => isNotHoliday(record.date))
  .and.validator(isExistingCustomerOrNewCustomerDay);
const comments = string.thatIs.requiredWhen(isNewCustomer);

const appointment = new Record({
  name,
  newCustomer,
  date,
  comments,
});

function capitalize(str) {
  return str.charAt(0).toUpperCase() + str.slice(1);
}

function isNewCustomer(record) {
  return !existingCustomers.includes(record.name);
}

function isWeekday(date) {
  return date.getDay() !== 0 && date.getDay() !== 6;
}

function isNotHoliday(date) {
  return !holidays.includes(date);
}

function isExistingCustomerOrNewCustomerDay(record) {
  return existingCustomers.includes(record.name) || record.date.getDay() === 5;
}

Docs

In the above code, string, boolean, and date are all instances of FieldType class. They're connected to one another in a Record. Not shown is a Recordset, which we would use to present a list of appointments, with pagination, sorting, filtering, and specific rules around how those work for each field.

More to come

Currently the best way to understand FDL is looking at how it's used in Jack Henry's internal codebase. We decided to open source the core as we believe it can be useful in other contexts.