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

Method _digitFromBasicCodePoint

src/Encoder/Bootstring.js:415–417  ·  view source on GitHub ↗

* Translates a Unicode code point into a basic code point digit. * @param {number} codePoint Unicode code point * @return {number} Basic code point digit or -1, if there is no digit * assigned to the given Unicode code point

(codePoint)

Source from the content-addressed store, hash-verified

413 * assigned to the given Unicode code point
414 */
415 _digitFromBasicCodePoint (codePoint) {
416 return this.getSettingValue('digitMapping').indexOfCodePoint(codePoint)
417 }
418
419 /**
420 * Translates a basic code point digit into a Unicode code point.

Callers 1

performDecodeMethod · 0.95

Calls 2

indexOfCodePointMethod · 0.80
getSettingValueMethod · 0.80

Tested by

no test coverage detected