(api: string)
| 37 | } |
| 38 | |
| 39 | function buildApi(api: string): string { |
| 40 | if (api === 'all') return 'OnJsonApiEvent'; |
| 41 | api = api.toLowerCase().replace(/^\/+|\/+$/g, ''); |
| 42 | return 'OnJsonApiEvent_' + api.replace(/\//g, '_'); |
| 43 | } |
| 44 | |
| 45 | function observe(api: string, listener: ApiListener) { |
| 46 | if (typeof api !== 'string' || api === '' |
no outgoing calls
no test coverage detected