MCPcopy Index your code
hub / github.com/nodejs/node / basicToDigit

Function basicToDigit

lib/punycode.js:156–167  ·  view source on GitHub ↗
(codePoint)

Source from the content-addressed store, hash-verified

154 * the code point does not represent a value.
155 */
156const basicToDigit = function(codePoint) {
157 if (codePoint >= 0x30 && codePoint < 0x3A) {
158 return 26 + (codePoint - 0x30);
159 }
160 if (codePoint >= 0x41 && codePoint < 0x5B) {
161 return codePoint - 0x41;
162 }
163 if (codePoint >= 0x61 && codePoint < 0x7B) {
164 return codePoint - 0x61;
165 }
166 return base;
167};
168
169/**
170 * Converts a digit/integer into a basic code point.

Callers 1

decodeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…