MCPcopy
hub / github.com/socketio/socket.io / toPositiveHex

Function toPositiveHex

packages/engine.io/test/util.mjs:273–281  ·  view source on GitHub ↗

* @param {string} hexString * @returns

(hexString)

Source from the content-addressed store, hash-verified

271 * @returns
272 */
273function toPositiveHex(hexString) {
274 let mostSiginficativeHexAsInt = parseInt(hexString[0], 16)
275 if (mostSiginficativeHexAsInt < 8) {
276 return hexString
277 }
278
279 mostSiginficativeHexAsInt -= 8
280 return mostSiginficativeHexAsInt.toString() + hexString.substring(1)
281}
282
283// the next is an edit of the selfsigned function reduced to the function necessary for webtransport
284/**

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected