( options = {} )
| 62 | |
| 63 | export class StorkClient { |
| 64 | constructor ( options = {} ) { |
| 65 | |
| 66 | this.name = options.name || 'index' |
| 67 | this.url = options.url || storkIndexRelativeURL |
| 68 | |
| 69 | // Configuration Reference - https://stork-search.net/docs/js-ref#showProgress |
| 70 | // Example - https://github.com/jameslittle230/stork/blob/ff49f163db06734e18ab690c188b45a3c68442ae/js/config.ts#L4 |
| 71 | this.config = { |
| 72 | minimumQueryLength: 1, |
| 73 | showScores: true, |
| 74 | ...options.config || {} |
| 75 | } |
| 76 | |
| 77 | // Stork instance |
| 78 | this.stork = options.stork || null |
| 79 | |
| 80 | this.cancelCurrentQuery = null |
| 81 | } |
| 82 | |
| 83 | setupState = 'not-setup' |
| 84 |
nothing calls this directly
no outgoing calls
no test coverage detected