replace underscore with our own

we only need like 5 simple functions
This commit is contained in:
Girish Ramakrishnan
2025-02-13 14:03:25 +01:00
parent c46c41db5a
commit dd5e4adc73
25 changed files with 111 additions and 65 deletions
+3 -3
View File
@@ -20,7 +20,7 @@ const assert = require('assert'),
dns = require('../dns.js'),
GCDNS = require('@google-cloud/dns').DNS,
waitForDns = require('./waitfordns.js'),
_ = require('underscore');
_ = require('../underscore.js');
function removePrivateFields(domainObject) {
domainObject.config.credentials.private_key = constants.SECRET_PLACEHOLDER;
@@ -176,8 +176,8 @@ async function verifyDomainConfig(domainObject) {
const zone = await getZoneByName(credentials, zoneName);
const definedNS = zone.metadata.nameServers.sort().map(function(r) { return r.replace(/\.$/, ''); });
if (!_.isEqual(definedNS, nameservers.sort())) {
const definedNS = zone.metadata.nameServers.map(function(r) { return r.replace(/\.$/, ''); });
if (!_.isEqual(definedNS.sort(), nameservers.sort())) {
debug('verifyDomainConfig: %j and %j do not match', nameservers, definedNS);
throw new BoxError(BoxError.BAD_FIELD, 'Domain nameservers are not set to Google Cloud DNS');
}