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

fitl-js

v1.1.0

Published

FiTL TypeScript/JavaScript Library

Readme

fitl-js

TS/JS library wrapper for fitl-wasm and fitl-rs. Mean to make implementing fitl to a javascript based page as easy as possible, while also solving clunkiness issues when it comes to packaging and compiling wasm based libraries.

For a full documentation/information about FiTL and how to write queries: GitHub

Getting Started

Installation

npm install fitl-js
pnpm install fitl-js

Hello World

import  { fitlFilter } from 'fitl-js';

let tableData = [
    { category: "meat" },
    { category: "fruit" }
];

let query = "category = fruit";

async function main(){
    try {
        let resultTable = await fitlFilter(query, tableData);
    } catch (error: unknown) {
        console.error(error);
    }
}
main();

Options are optional of course, currently used to specify input/output table types with other future options coming soon.

import  { fitlFilter, type Options } from 'fitl-js';

let tableData = [
    { category: "meat" },
    { category: "fruit" }
];

let query = "category = fruit";

// Default tableFormat is JSARRAY, other table formats coming soon
let options: Options = { tableFormat: 'JSARRAY' };

async function main(){
    try {
        let resultTable = await fitlFilter(query, tableData, options);
    } catch (error: unknown) {
        console.error(error);
    }
}
main();

Column Types

You can specify a data type for a column for more specific query options.

For example:

let tableData = [
    { name: "apple", amount: 3 },
    { name: "banana", amount: 8 }
];
let query = "";

console.log(await fitlFilter(query, tableData));

The above will automatically parse the "amount" column as a string. This example outputs:

{`[{ name: "apple", amount: 3 },
   { name: "banana", amount: 8 }]`}

And only allows you to do string based operations on the amount column. To specify that the amount column is a numeric column in the options parameter of "filtFilter" like so:

const options: Options = {
    columnTypes: {
        amount: "number",
    }
}

In code example:

let tableData = [
    { name: "apple", amount: 3 },
    { name: "banana", amount: 8 }
];
let query = "";

const options: Options = {
    tableFormat: "JSARRAY",
    columnTypes: {
        amount: "number",
    }
}

console.log(await fitlFilter(query, tableData, options));

Which allows for numeric operations on columns and outputs the "amount" values as actual JavaScript numbers:

{`[{ name: "apple", amount: 3 },
   { name: "banana", amount: 8 }]`}

Available column types are "string", "number", and "boolean"

Building from Source

To build fitl-js from source

Requirements:

  • Rust >= 1.8
  • Nodejs >= v22

Once everything is installed, clone the repo and build local dependencies

git clone https://github.com/Slad3/FilterTableLanguage.git
cd FilterTableLanguage/fitl-rs
cargo build
cd ../fitl-js/fitl-wasm
cargo build
wasm-pack build --target web --release
cd ..
npm install

Next package fitl-wasm into a singular TS file so we don't have to worry about packaging, serving, and sending .wasm files

npm run wasminstall

When ran successfully, this command should put a fitl-wasm.wasm.ts file in the fitl-js/src folder. If it didn't run successfully, check your fitl-wasm/pkg folder for correctly built files or if wasmwrap got installed correctly

Run an npm run build to build the library to the fitl-js/dist folder, or an 'npm run test' to just run all jest tests.