⛔️ NOTE: NOT READY FOR PRODUCTION!
Fast and zero dependencies table-like data procession like sorting, filtering, transforming and count total value.
npm install tablegun
Should filter users over 19 years old
// Create some data
const data: User[] = [
{ name: 'John', age: 14 },
{ name: 'Jane', age: 17 },
{ name: 'Bob', age: 19 },
{ name: 'Paul', age: 20 },
{ name: 'Kate', age: 30 },
]
// Define columns
const columns: Column[] = [
// Define column for 'age'
Column.build('age', [ { filter: (age: number) => age > 19 } ])
]
// Create table with defined columns
const table: Table<any> = new Table(columns)
// Calculate result
console.log(table.calculate(data).map((repo: any) => repo.name))
// > [
// 'Paul',
// 'Kate',
// ]
Check the CONTRIBUTING file
Generated using TypeDoc