@hello.nrfcloud.com/proto
Version:
Documents the communication protocol between the hello.nrfcloud.com backend and the web application
14 lines (13 loc) • 471 B
JavaScript
export var alphabet = 'abcdefghijkmnpqrstuvwxyz' // Removed o,l
;
export var numbers = '23456789' // Removed 0,1
;
export var generateCode = function() {
var len = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 6;
var characters = "".concat(alphabet).concat(numbers);
var code = "";
for(var n = 0; n < len; n++){
code = "".concat(code).concat(characters[Math.floor(Math.random() * characters.length)]);
}
return code;
};