MCPcopy
hub / github.com/zpao/qrcode.react / encodeText

Method encodeText

src/third-party/qrcodegen/index.ts:44–47  ·  view source on GitHub ↗
(text: string, ecl: QrCode.Ecc)

Source from the content-addressed store, hash-verified

42 // QR Code version is automatically chosen for the output. The ECC level of the result may be higher than the
43 // ecl argument if it can be done without increasing the version.
44 public static encodeText(text: string, ecl: QrCode.Ecc): QrCode {
45 const segs: Array<QrSegment> = qrcodegen.QrSegment.makeSegments(text);
46 return QrCode.encodeSegments(segs, ecl);
47 }
48
49
50 // Returns a QR Code representing the given binary data at the given error correction level.

Callers

nothing calls this directly

Calls 2

makeSegmentsMethod · 0.80
encodeSegmentsMethod · 0.80

Tested by

no test coverage detected