code: function (ip1, ip2) {
  
      if (typeof ip1 === "string")
        ip1 = this.parseIp(ip1);
  
      if (typeof ip2 === "string")
        ip2 = this.parseIp(ip2);
  
      const cidr = 32 - Math.floor(Math.log2((ip1 ^ (ip2 - 1)) + 2)) - 1;
  
      return this.netmaskFromCIDR(cidr);
    }
docs: Source: http://www.xarg.org/tools/subnet-calculator/