[DEPRECATED] Go implementation of plcbundle
at main 425 B view raw
1function detect({ op }) { 2 // op.operation contains the PLC operation data 3 // op.did - DID identifier 4 // op.cid - Content ID 5 // op.createdAt - Timestamp 6 7 const labels = []; 8 9 // Add your detection logic here 10 // Return array of label strings 11 // Return empty array [] for no match 12 13 //console.log(JSON.stringify(op)) 14 15 if (op.did.match(/^did:plc:aaa/)) { 16 labels.push('test') 17 } 18 19 return labels; 20}