⚡ Zero-dependency plcbundle library exclusively for Bun

update readme

Changed files
+16 -7
examples
+1 -1
README.md
··· 1 1 # plcbundle-bun 2 2 3 - ⚡ plcbundle library built exclusively for **[Bun](https://bun.sh)**. 3 + ⚡ [plcbundle](https://tangled.org/@atscan.net/plcbundle/blob/main/docs/specification.md) library built exclusively for **[Bun](https://bun.sh)**. 4 4 5 5 Leverages Bun's native features: 6 6 - 🗜️ Native `Bun.zstdDecompressSync()` - zero-copy decompression
+15 -3
examples/detect.ts
··· 1 1 /** 2 - * Example detect function for use with plcbundle "detect" command 2 + * Example detect function for filtering operations 3 + * 4 + * Usage: 5 + * bun src/cli.ts detect --detect ./examples/detect.ts 3 6 */ 4 7 5 8 export function detect({ op }: { op: any }) { 6 9 const labels = []; 7 10 11 + // Example: Detect test accounts 8 12 if (op.did.startsWith('did:plc:aa')) { 9 - labels.push('test'); 13 + labels.push('test-account'); 10 14 } 11 15 12 - // Add your custom detection logic here 16 + // Example: Detect by handle pattern 17 + if (op.operation?.alsoKnownAs?.[0]?.includes('.test')) { 18 + labels.push('test-handle'); 19 + } 20 + 21 + // Example: Detect accounts created in 2024 22 + if (op.createdAt?.startsWith('2024')) { 23 + labels.push('created-2024'); 24 + } 13 25 14 26 return labels; 15 27 }
-3
package.json
··· 19 19 "test:coverage": "bun test --coverage", 20 20 "cli": "bun src/cli.ts" 21 21 }, 22 - "peerDependencies": { 23 - "bun": ">=1.0.0" 24 - }, 25 22 "devDependencies": { 26 23 "@types/bun": "^1.3.1" 27 24 }