lib/random.js
function toArray (id) {
  if (!isValid(id)) throw new Error('random#toArray: Need valid id');
  // Decode
  var result = [];
  for (var i = 0; i < id.length; i++) {
    result.push(baseURL.ALPHABET.indexOf(id[i]));
  }
  return result;
}
function toArray (id) {
  if (!isValid(id)) throw new Error('random#toArray: Need valid id');
  // Decode
  var result = [];
  for (var i = 0; i < id.length; i++) {
    result.push(baseURL.ALPHABET.indexOf(id[i]));
  }
  return result;
}
function toArray ( id ) { if ( ! isValid ( id ) ) throw new Error ( 'random#toArray: Need valid id' ) ; // Decode var result = [ ] ; for ( var i = 0 ; i < id . length ; i ++ ) { result . push ( baseURL . ALPHABET . indexOf ( id [ i ] ) ) ; } return result ; }
Convert a random id to Integer Array
@param {string} id The id to convert.
@return {Array.<number>} result
Convert a random id to Integer Array