(key: string, criterion: string)
| 41 | (event: Event): boolean => { |
| 42 | const startsWith = (input: string) => (prefix: string) => input.startsWith(prefix) |
| 43 | const isMatchingGenericTagCriterion = (key: string, criterion: string) => (tag: Tag): boolean => { |
| 44 | const [, tagName] = key |
| 45 | if (tag[0] !== tagName) { |
| 46 | return false |
| 47 | } |
| 48 | |
| 49 | if (isGeohashPrefixCriterion(key, criterion)) { |
| 50 | return tag[1].startsWith(stripGeohashPrefixWildcard(criterion)) |
| 51 | } |
| 52 | |
| 53 | return tag[1] === criterion |
| 54 | } |
| 55 | |
| 56 | // NIP-01: Basic protocol flow description |
| 57 |
no test coverage detected