MCPcopy
hub / github.com/zxing-js/library / encode

Method encode

src/core/common/ECIEncoderSet.ts:186–195  ·  view source on GitHub ↗
(c: char, encoderIndex: number)

Source from the content-addressed store, hash-verified

184 }
185
186 public encode(c: char, encoderIndex: number): Uint8Array {
187 if (!(encoderIndex < this.length())) {
188 throw new Error('index must be less than length');
189 }
190
191 return StringEncoding.encode(
192 StringUtils.getCharAt(c),
193 this.encoders[encoderIndex].name
194 );
195 }
196}

Callers

nothing calls this directly

Calls 3

lengthMethod · 0.95
getCharAtMethod · 0.80
encodeMethod · 0.65

Tested by

no test coverage detected