modules/orionode/lib/shared/db/sharedProjects.js
function generateUniqueHubId() {
		//TODO ensure generated hub id is unique (not in db)
		// do {
		var length = 10;
		var letters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUV0123456789';
		var s = '';
		for (var i=0; i<length; i++) {
			s += letters.charAt(Math.floor(Math.random() * letters.length));
		}
		// } while (s == 0); //TODO actually check in db for value existence

		return s;
	}
function generateUniqueHubId() {
		//TODO ensure generated hub id is unique (not in db)
		// do {
		var length = 10;
		var letters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUV0123456789';
		var s = '';
		for (var i=0; i<length; i++) {
			s += letters.charAt(Math.floor(Math.random() * letters.length));
		}
		// } while (s == 0); //TODO actually check in db for value existence

		return s;
	}
function generateUniqueHubId ( ) { //TODO ensure generated hub id is unique (not in db) // do { var length = 10 ; var letters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUV0123456789' ; var s = '' ; for ( var i = 0 ; i < length ; i ++ ) { s += letters . charAt ( Math . floor ( Math . random ( ) * letters . length ) ) ; } // } while (s == 0); //TODO actually check in db for value existence return s ; }
returns a unique hubID
returns a unique hubID