     return callback null
 
 
-
 isSuggestedUsernameLengthValid = (suggestedUsername) ->
 
-  if 4 <= suggestedUsername?.length <= 15
-  then yes
-  else no
+  return SUGGESTED_USERNAME_MIN_LENGTH <= suggestedUsername?.length <= SUGGESTED_USERNAME_MAX_LENGTH
 
 
 isUsernameLengthValid = (username) ->

  { JUser } = koding.models
  { minLength, maxLength } = JUser.getValidUsernameLengthRange()

  if minLength <= username?.length <= maxLength
  then yes
  else no



module.exports = {
  sendApiError
  sendApiResponse
  isUsernameLengthValid
  checkApiAvailability
  isSuggestedUsernameLengthValid
}


errors = require './errors'
koding = require '../../bongo'

SUGGESTED_USERNAME_MIN_LENGTH = 4
SUGGESTED_USERNAME_MAX_LENGTH = 15

sendApiError = (res, error) ->

