MCPcopy Create free account
hub / github.com/cryptii/cryptii / getCharBytesAt

Method getCharBytesAt

src/Chain.js:124–126  ·  view source on GitHub ↗

* Returns the byte representation of a Unicode character at given index. * @param {number} index Unicode code point index * @return {Uint8Array} Character bytes

(index)

Source from the content-addressed store, hash-verified

122 * @return {Uint8Array} Character bytes
123 */
124 getCharBytesAt (index) {
125 return TextEncoder.bytesFromCodePoints([this.getCodePointAt(index)])
126 }
127
128 /**
129 * Returns the amount of Unicode code points inside chain.

Callers 1

performEncodeMethod · 0.80

Calls 2

getCodePointAtMethod · 0.95
bytesFromCodePointsMethod · 0.80

Tested by

no test coverage detected