MCPcopy Index your code
hub / github.com/socketio/socket.io / encode

Function encode

client-dist/socket.io.js:1027–1034  ·  view source on GitHub ↗

* Return a string representing the specified number. * * @param {Number} num The number to convert. * @returns {String} The string representation of the number. * @api public

(num)

Source from the content-addressed store, hash-verified

1025 * @api public
1026 */
1027 function encode(num) {
1028 var encoded = '';
1029 do {
1030 encoded = alphabet[num % length] + encoded;
1031 num = Math.floor(num / length);
1032 } while (num > 0);
1033 return encoded;
1034 }
1035 /**
1036 * Yeast: A tiny growing id generator.
1037 *

Callers 1

yeastFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected