14 lines
317 B
JavaScript
14 lines
317 B
JavaScript
(function (exports) {
|
|
'use strict';
|
|
|
|
// An 'A' record is a 32-bit value representing the IP address
|
|
|
|
exports.DNS_TYPE_A = function (rdata) {
|
|
var ui8 = new Uint8Array(rdata);
|
|
// i.e. 127.0.0.1
|
|
|
|
return ui8[0] + '.' + ui8[1] + '.' + ui8[2] + '.' + ui8[3];
|
|
};
|
|
|
|
}('undefined' !== typeof window ? window : exports));
|