lib/list.js
function generateRandomId (length) {
  var str = ''
  length = length || 6
  while (str.length < length) {
    str += (((1 + Math.random()) * 0x10000) | 0).toString(16)
  }
  return str.substring(str.length - length, str.length)
}
function generateRandomId (length) {
  var str = ''
  length = length || 6
  while (str.length < length) {
    str += (((1 + Math.random()) * 0x10000) | 0).toString(16)
  }
  return str.substring(str.length - length, str.length)
}
function generateRandomId ( length ) { var str = '' length = length || 6 while ( str . length < length ) { str += ( ( ( 1 + Math . random ( ) ) * 0x10000 ) | 0 ) . toString ( 16 ) } return str . substring ( str . length - length , str . length ) }
Generate an alphanumeric ID with the given length.
@param  {Integer} length
@return {String}        ID
Generate an alphanumeric ID with the given length .