(config: {
hps?: Hps;
} = {})
| 53 | private writeNonEmptyStringWithHeader: (v: string) => void; |
| 54 | |
| 55 | constructor(config: { |
| 56 | hps?: Hps; |
| 57 | } = {}) { |
| 58 | this.initPoll(); |
| 59 | this.config = config; |
| 60 | this.hpsEnable = Boolean(config?.hps); |
| 61 | this.internalStringDetector = getInternalStringDetector(); |
| 62 | if (this.hpsEnable) { |
| 63 | this.writeNonEmptyStringWithHeader = v => this.stringWithHeaderFast(v); |
| 64 | } else if (this.internalStringDetector !== null) { |
| 65 | this.writeNonEmptyStringWithHeader = v => this.stringWithHeaderWithDetector(v); |
| 66 | } else { |
| 67 | this.writeNonEmptyStringWithHeader = v => this.stringWithHeaderCompatibly(v); |
| 68 | } |
| 69 | } |
| 70 | |
| 71 | private initPoll() { |
| 72 | this.byteLength = 1024 * 100; |
nothing calls this directly
no test coverage detected