( src: Buffer, prefix: Buffer, at: number, end: number, )
| 537 | } |
| 538 | |
| 539 | function hasPrefix( |
| 540 | src: Buffer, |
| 541 | prefix: Buffer, |
| 542 | at: number, |
| 543 | end: number, |
| 544 | ): boolean { |
| 545 | return ( |
| 546 | end - at >= prefix.length && |
| 547 | src.compare(prefix, 0, prefix.length, at, at + prefix.length) === 0 |
| 548 | ) |
| 549 | } |
| 550 | |
| 551 | const ATTR_SNAP_PREFIX = Buffer.from('{"type":"attribution-snapshot"') |
| 552 | const SYSTEM_PREFIX = Buffer.from('{"type":"system"') |
no outgoing calls
no test coverage detected