src/lib/db.js
function getTokenHashes(username, done) {
  return getUser(username, function(getUserErr, user) {
    if (getUserErr) {
      return done(getUserErr);
    }

    if (!user) {
      return done(new Error(`user '${username}' not found`));
    }

    return done(null, user.tokens);
  });
}
function getTokenHashes(username, done) {
  return getUser(username, function(getUserErr, user) {
    if (getUserErr) {
      return done(getUserErr);
    }

    if (!user) {
      return done(new Error(`user '${username}' not found`));
    }

    return done(null, user.tokens);
  });
}
function getTokenHashes ( username , done ) { return getUser ( username , function ( getUserErr , user ) { if ( getUserErr ) { return done ( getUserErr ) ; } if ( ! user ) { return done ( new Error ( ` ${ username } ` ) ) ; } return done ( null , user . tokens ) ; } ) ; }
Retrieve users tokens

@param {String} username
@param {Function} done - done(err, hashes)
Retrieve users tokens