Making data processing safe and delightful with TypeScript

Say hello to the simple lightweight library for type-safe data processing written in TypeScript, optimized for Bun, providing amazing DX and reducing runtime errors.

LightweightA+ Developer ExperienceFlexibleOptimized for Bun

Overview

example.ts
import Breadroll from "breadroll";
 
const csv = new Breadroll({ header: true });
const df = await csv.open.local<T>("./test/data/cities.csv", ",");
 
const selected = df.select(["name", "country_code", "country_name", "latitude", "longitude"]);
console.table(selected.value);
šŸ’”

In this example, the Breadroll instance accepts its options object DataframeReadOptions, we now move on to open a file from disk using .open.local(...), then select a few columns from the dataframe, retrieve the value and then print out the value using console.table(...). The resulting output to the console, will be also follows;

|     | name      | country_code | country_name | latitude | longitude |
| --- | --------- | ------------ | ------------ | -------- | --------- |
| 0   | Ashkāsham | AF           | Afghanistan  | 36.68333 | 71.53333  |
| 1   | Fayzabad  | AF           | Afghanistan  | 37.11664 | 70.58002  |
| 2   | Jurm      | AF           | Afghanistan  | 36.86477 | 70.83421  |
| 3   | Khandūd   | AF           | Afghanistan  | 36.95127 | 72.318    |
| 4   | Rāghistān | AF           | Afghanistan  | 37.66079 | 70.67346  |
...

Features

With just a few lines of code you can start performing data processing within your TypeScript/JavaScript code, like a pro data-mage, with this feature coming straight out-of-the-box

  • Async File Loading - Optimistically load files from disk, via Bun's File API
  • Lightweight - trying to keep it as light as possible
  • Flexible and unopinionated - maintain control while intergrating your favorite tools into breadroll
  • Remote Data Source - comes with remote data sources loved by JavaScript developers
  • Data transformation - convenience functions that allows you to perform complex data transformations
  • Supported Format - CSV, TSV, JSON, and more coming soon

Follow

This package is being developed and actively maintained by @devsgnr (opens in a new tab), follow @breadrolljs (opens in a new tab) for future feature releases and updates