mirror of
https://github.com/documize/community.git
synced 2025-07-23 15:19:42 +02:00
Replaced underscore.js & is.js with lodash.js
This commit is contained in:
parent
df8e843bf5
commit
566807bc14
93 changed files with 17379 additions and 2056 deletions
|
@ -10,7 +10,7 @@
|
|||
// https://documize.com
|
||||
|
||||
function getSubdomain() {
|
||||
if (is.ipv4(window.location.host)) {
|
||||
if (isIPv4(window.location.host)) {
|
||||
return "";
|
||||
}
|
||||
|
||||
|
@ -30,7 +30,7 @@ function getAppUrl(domain) {
|
|||
|
||||
let leftOvers = parts.join(".");
|
||||
|
||||
if (is.empty(domain)) {
|
||||
if (_.isEmpty(domain)) {
|
||||
domain = "";
|
||||
} else {
|
||||
domain = domain + ".";
|
||||
|
@ -82,10 +82,16 @@ function isInvalidLicenseError(reason) {
|
|||
return false;
|
||||
}
|
||||
|
||||
function isIPv4(ip) {
|
||||
var re = /^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/;
|
||||
return re.test(ip);
|
||||
}
|
||||
|
||||
export default {
|
||||
getSubdomain,
|
||||
getAppUrl,
|
||||
isAjaxAccessError,
|
||||
isAjaxNotFoundError,
|
||||
isInvalidLicenseError,
|
||||
isIPv4,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue