gzuncompress
|
Server IP : 172.19.0.3 / Your IP : 216.73.216.178 Web Server : Apache/2.4 System : Linux 880f91b28fd7 5.15.0-117-generic #127~20.04.1-Ubuntu SMP Thu Jul 11 15:36:12 UTC 2024 x86_64 User : tomlinde ( 155017) PHP Version : 5.6.40 Disable Function : dl, syslog, opcache_get_status MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /home/../lib/node_modules/npm/node_modules/aproba/../npm-user-validate/lib/ |
| [ Home ] | [ C0mmand ] | [ Upload File ] | [ Lock Shell ] | [ Logout ] |
|---|
exports.email = email
exports.pw = pw
exports.username = username
var requirements = exports.requirements = {
username: {
length: 'Name length must be less than or equal to 214 characters long',
lowerCase: 'Name must be lowercase',
urlSafe: 'Name may not contain non-url-safe chars',
dot: 'Name may not start with "."',
illegal: 'Name may not contain illegal character',
},
password: {},
email: {
length: 'Email length must be less then or equal to 254 characters long',
valid: 'Email must be an email address',
},
}
var illegalCharacterRe = new RegExp('([' + [
"'",
].join() + '])')
function username (un) {
if (un !== un.toLowerCase()) {
return new Error(requirements.username.lowerCase)
}
if (un !== encodeURIComponent(un)) {
return new Error(requirements.username.urlSafe)
}
if (un.charAt(0) === '.') {
return new Error(requirements.username.dot)
}
if (un.length > 214) {
return new Error(requirements.username.length)
}
var illegal = un.match(illegalCharacterRe)
if (illegal) {
return new Error(requirements.username.illegal + ' "' + illegal[0] + '"')
}
return null
}
function email (em) {
if (em.length > 254) {
return new Error(requirements.email.length)
}
if (!em.match(/^[^@]+@.+\..+$/)) {
return new Error(requirements.email.valid)
}
return null
}
function pw () {
return null
}