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

Function adapt

lib/punycode.js:191–199  ·  view source on GitHub ↗
(delta, numPoints, firstTime)

Source from the content-addressed store, hash-verified

189 * @private
190 */
191const adapt = function(delta, numPoints, firstTime) {
192 let k = 0;
193 delta = firstTime ? floor(delta / damp) : delta >> 1;
194 delta += floor(delta / numPoints);
195 for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {
196 delta = floor(delta / baseMinusTMin);
197 }
198 return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));
199};
200
201/**
202 * Converts a Punycode string of ASCII-only symbols to a string of Unicode

Callers 2

decodeFunction · 0.85
encodeFunction · 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…