dns-suite.js/packer/type.soa.js

31 lines
581 B
JavaScript
Raw Normal View History

2017-03-05 00:10:25 +00:00
(function (exports) {
'use strict';
2017-03-10 02:34:27 +00:00
2017-03-05 00:10:25 +00:00
exports.DNS_PACKER_TYPE_SOA = function (ab, dv, total, record) {
2017-03-10 02:34:27 +00:00
if(!record.sn){
throw new Error("no serial number for SOA record");
}
if(!record.ref){
throw new Error("no serial number for SOA record");
}
if(!record.ret){
throw new Error("no serial number for SOA record");
}
if(!record.ex){
throw new Error("no serial number for SOA record");
}
if(!record.nx){
throw new Error("no serial number for SOA record");
}
2017-03-05 00:10:25 +00:00
return total;
};
}('undefined' !== typeof window ? window : exports));