⚡ Zero-dependency plcbundle library exclusively for Bun
at main 463 B view raw
1/** 2 * Example: Filter operations and export to JSONL 3 * 4 * Usage: 5 * bun examples/filter.ts > filtered.jsonl 6 */ 7 8import { PLCBundle } from '../src'; 9 10const bundle = new PLCBundle('./data/bundles'); 11 12let matched = 0; 13 14await bundle.processBundles(1, 10, (op) => { 15 // Filter: Only operations from 2024 16 if (op.createdAt.startsWith('2024')) { 17 console.log(JSON.stringify(op)); 18 matched++; 19 } 20}); 21 22console.error(`\n✓ Filtered ${matched} operations`);