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

Function decode

packages/socket.io-adapter/lib/contrib/yeast.ts:39–47  ·  view source on GitHub ↗
(str)

Source from the content-addressed store, hash-verified

37 * @api public
38 */
39export function decode(str) {
40 let decoded = 0;
41
42 for (i = 0; i < str.length; i++) {
43 decoded = decoded * length + map[str.charAt(i)];
44 }
45
46 return decoded;
47}
48
49/**
50 * Yeast: A tiny growing id generator.

Callers 2

setupPrimaryWithRedisFunction · 0.50
constructorMethod · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected