kopia lustrzana https://github.com/c9/core
15 wiersze
350 B
JavaScript
15 wiersze
350 B
JavaScript
![]() |
var _ = require("lodash");
|
||
|
|
||
|
|
||
|
var internalDomain = ['c9.io', 'clou9beta.com'];
|
||
|
|
||
|
function hasInternalDomain(email) {
|
||
![]() |
if (!email) return false;
|
||
|
|
||
![]() |
var emailElements = email.split("@");
|
||
|
var emailDomain = emailElements[emailElements.length - 1];
|
||
|
|
||
|
return _.contains(internalDomain, emailDomain);
|
||
|
}
|
||
|
|
||
![]() |
module.exports = hasInternalDomain;
|